home *** CD-ROM | disk | FTP | other *** search
/ LSD Docs / LSD Docs.iso / FILEZ / lsd43.dms / lsd43.adf / Real3D..part6 / Real3D..part6
Text File  |  1978-03-23  |  150KB  |  7,732 lines

  1.  
  2.  
  3.  
  4.                 
  5.                  PART 6
  6.  
  7.  
  8.  
  9.  
  10.                              - REFERENCE 3.4 -
  11.  
  12. WORD
  13.  
  14.      >
  15.  
  16. TEMPLATE
  17.  
  18.      i2 i1 > IResult
  19.  
  20. DESCRIPTION
  21.  
  22. Takes two integer values off the stack and compares them. If the second
  23. value is greater than the first value, > puts TRUE on the stack, otherwise
  24. FALSE is put on the stack.
  25.  
  26. EXAMPLE
  27.  
  28.      10 20 >.(0
  29.      10 5 >.(1
  30.  
  31. WORD
  32.  
  33.      >=
  34.  
  35. TEMPLATE
  36.  
  37.      i2 i1 >=IResult
  38.  
  39. DESCRIPTION
  40.  
  41. Takes two integer values off the stack and compares them. If the second
  42. value is greater than or equal to the first value, >= puts TRUE on the
  43. stack, otherwise FALSE is put on the stack.
  44.  
  45. EXAMPLE
  46.  
  47.      : IsNegative (val)
  48.         0>=
  49.         IF
  50.           "yes"PUTS
  51.         ELSE
  52.           "no"PUTS
  53.         ENDIF
  54.      ;
  55.  
  56.      10 IsNegative (no
  57.      -1 IsNegative (yes
  58.      0 IsNegative (no
  59.  
  60. WORD
  61.  
  62.      >R
  63.  
  64. TEMPLATE
  65.  
  66.      e>R
  67.  
  68. DESCRIPTION
  69.  
  70. Takes the stack top values and stores it on the Return Stack as an integer
  71. value.
  72.  
  73. SEE ALSO
  74.  
  75.      R>
  76.  
  77. WORD
  78.  
  79.      >RAD
  80.  
  81. TEMPLATE
  82.  
  83.      fDeg >RAD fRad
  84.  
  85. DESCRIPTION
  86.  
  87. Converts a value given in degrees to radians.
  88.  
  89. EXAMPLE
  90.  
  91.      180.0>RAD F.(3.141593
  92.  
  93. WORD
  94.  
  95.      ?&
  96.  
  97. TEMPLATE
  98.  
  99.      ?& name a
  100.  
  101. DESCRIPTION
  102.  
  103. Retrieves the address of a given word. If the word is not found pushes a
  104. 0 onto the stack.
  105.  
  106.                              - REFERENCE 3.5 -
  107.  
  108. EXAMPLE
  109.  
  110.      : DO_IF_FOUND ( executes word DOIT
  111.                    ( if it has been defined
  112.       DOIT ?& ?DUP
  113.       IF
  114.         EXECUTE
  115.       ENDIF
  116.      ;
  117.  
  118. SEE ALSO
  119.  
  120.      & EXECUTE
  121.  
  122. WORD
  123.  
  124.      ?DUP
  125.  
  126. TEMPLATE
  127.  
  128.      e ?DUP e e
  129.  
  130. DESCRIPTION
  131.  
  132. Duplicates the stack top value if it is not zero.
  133.  
  134. SEE ALSO
  135.  
  136.      DUP
  137.  
  138. WORD
  139.  
  140.      ?ELSE
  141.  
  142. TEMPLATE
  143.  
  144.      ?ELSE
  145.  
  146. DESCRIPTION
  147.  
  148. In an interactive conditional structure marks the beginning of the block
  149. that is to be executed when the condition fails (i.e the flag tested is
  150. FALSE).
  151.  
  152. SEE ALSO
  153.  
  154.      ?ENDIF ?IF ELSE ENDIF IF
  155.  
  156. EXAMPLE
  157.  
  158.      ( define constant if not yet defined )
  159.       ?& MyVar NOT
  160.       ?IF
  161.         1 CONSTANT MyVar
  162.       ?ENDIF
  163.  
  164. WORD
  165.  
  166.      ?ENDIF
  167.  
  168. TEMPLATE
  169.  
  170.      ?ENDIF
  171.  
  172. DESCRIPTION
  173.  
  174. Ends an interactive conditional structure, either ?IF..?ENDIF or
  175. ?IF...?ELSE. .?ENDIF.
  176.  
  177. SEE ALSO
  178.  
  179.      ?ELSE ?IF ELSE ENDIF IF
  180.  
  181. WORD
  182.  
  183.      ?IF
  184.  
  185. TEMPLATE
  186.  
  187.      I ?IF
  188.  
  189. DESCRIPTION
  190.  
  191. Begins an interactive conditional structure, . either ?IF..?ENDIF or
  192. ?IF..?ELSE..?ENDIF.
  193.  
  194. If the flag is TRUE then the words entered after ?IF will be executed
  195. immediately until either ?ELSE or ?ENDIF is encountered.
  196.  
  197. If the flag is FALSE, the words between ?IF and ?ELSE/?ENDIF are ignored.
  198. Execution then resumes after ?ELSE/?ENDIF.
  199.  
  200. The interactive conditional structure remains active until ?ENDIF is
  201. encountered.
  202.  
  203. These interactive conditional structures may be nested.
  204.  
  205.                              - REFERENCE 3.6 -
  206.  
  207. Note:
  208.  
  209. Interactive conditional structures can be used to control the execution of
  210. parts of an RPL file as it is loaded.
  211.  
  212. EXAMPLE
  213.  
  214.      ( check if the word VADD is already defined )
  215.      ?& VADD
  216.      ?IF
  217.         "vectors.rpl already installed" PUTS
  218.      ?ELSE
  219.         "vectors.rpl" LOAD
  220.      ?ENDIF
  221.  
  222. SEE ALSO
  223.  
  224.      ?ELSE ?ENDIF ELSE ENDIF IF
  225.  
  226. WORD
  227.  
  228.      @
  229.  
  230. TEMPLATE
  231.  
  232.      aInteger @ iValue
  233.  
  234. DESCRIPTION
  235.  
  236. Fetches the value of an integer variable and puts the value on the stack
  237. top. The address of the integer variable must be on the stack top before
  238. calling this word.
  239.  
  240. EXAMPLE
  241.  
  242.      ( MyVar = MyVar + 1 )
  243.      MyVar @ 1 + MyVar @ !
  244.  
  245. SEE ALSO
  246.  
  247.      ! VARIABLE
  248.  
  249. WORD
  250.  
  251.      AGAIN
  252.  
  253. TEMPLATE
  254.  
  255.      AGAIN
  256.  
  257. DESCRIPTION
  258.  
  259. Marks the end of an BEGIN..AGAIN loop. The BEGIN..AGAIN loop executes
  260. forever unless a QUIT or EXIT is executed.
  261.  
  262. Note:
  263.  
  264. Can only be used inside a word definition.
  265.  
  266. EXAMPLE
  267.  
  268.      : MyLoop
  269.       BEGIN
  270.         "YESlNO'" "Cancel Loop ?" GET_KEY
  271.         IF
  272.           EXIT
  273.         ENDIF
  274.       AGAIN
  275.      ;
  276.  
  277. SEE ALSO
  278.  
  279.      BEGIN EXIT QUIT
  280.  
  281. WORD
  282.  
  283.      AND
  284.  
  285. TEMPLATE
  286.  
  287.      I2 I1 AND I
  288.  
  289. DESCRIPTION
  290.  
  291. Takes two boolean flags off the stack and, if they both are TRUE, puts
  292. TRUE on the stack, otherwise puts FALSE on the stack. The value is TRUE
  293. if it is not zero.
  294.  
  295.                              - REFERENCE 3.7 -
  296.  
  297. SEE ALSO
  298.  
  299.      IF OR XOR
  300.  
  301. EXAMPLE
  302.  
  303. 1 1   AND . ( 1
  304. 0 1   AND . ( 0
  305. 0 0   AND . ( 0
  306. 10 20 AND . ( 1
  307.  
  308. WORD
  309.  
  310.      ACOS
  311.  
  312. TEMPLATE
  313.  
  314.      fRad ACOS fAng
  315.  
  316. RETURNS
  317.  
  318.      fAng - value from 0 to PI
  319.  
  320. DESCRIPTION
  321.  
  322. Arccosine function.
  323.  
  324. EXAMPLE
  325.  
  326.      0.5 ACOS F.
  327.  
  328. SEE ALSO
  329.  
  330.      ASIN, ATAN, COS
  331.  
  332. WORD
  333.  
  334.      ASIN
  335.  
  336. TEMPLATE
  337.  
  338.      fRad ASIN fAng
  339.  
  340. RETURNS
  341.  
  342.      fAng - value from -PI/2 to PI/2
  343.  
  344. DESCRIPTION
  345.  
  346. Arcsine function.
  347.  
  348. EXAMPLE
  349.  
  350.      0.5 ASIN F.
  351.  
  352. SEE ALSO
  353.  
  354.      ACOS, ATAN, COS
  355.  
  356. WORD
  357.  
  358.      ATAN
  359.  
  360. TEMPLATE
  361.  
  362.      fRad ATAN fAng
  363.  
  364. RETURNS
  365.  
  366.      fAng - value from -PI/2 to PI/2
  367.  
  368. DESCRIPTION
  369.  
  370. Arctangent function.
  371.  
  372. SEE ALSO
  373.  
  374.      ASIN, ACOS, TAN
  375.  
  376. WORD
  377.  
  378.      B.
  379.  
  380. TEMPLATE
  381.  
  382.      iB.
  383.  
  384. DESCRIPTION
  385.  
  386. Takes an integer off the stack and prints it as a binary number.
  387.  
  388.                              - REFERENCE 3.8 -
  389.  
  390. SEE ALSO
  391.  
  392.      .H.O.
  393.  
  394. EXAMPLE
  395.  
  396.      1 B.
  397. (00000000000000000000000000000001
  398.      2 B.
  399. (00000000000000000000000000000010
  400.      3 B.
  401. (00000000000000000000000000000011
  402.      4 B.
  403. (00000000000000000000000000000100
  404.  
  405. -
  406.  
  407. WORD
  408.  
  409.      B!
  410.  
  411. TEMPLATE
  412.  
  413.      b aByte B!
  414.  
  415. DESCRIPTION
  416.  
  417. Stores a value in a byte variable. Takes the address of the variable and
  418. the value to be stored off the stack.
  419.  
  420. Note:
  421.  
  422. There are no byte variables in RPL. This word is needed only when
  423. accessing 8 bit data (like R,G,B) from data structures.
  424.  
  425. SEE ALSO
  426.  
  427.      W! W@ B@
  428.  
  429. WORD
  430.  
  431.      B@
  432.  
  433. TEMPLATE
  434.  
  435.      aByte B@ iValue
  436.  
  437. DESCRIPTION
  438.  
  439. Fetches the value of a byte. The address of the byte must be in the stack
  440. top before calling this word.
  441.  
  442. Note:
  443.  
  444. See Note: for B!.
  445.  
  446. SEE ALSO
  447.  
  448.      W! W@ B!
  449.  
  450. WORD
  451.  
  452.      BAND
  453.  
  454. TEMPLATE
  455.  
  456.      i2 i1 BAND i
  457.  
  458. DESCRIPTION
  459.  
  460. Makes a binary AND operation on the two operands and puts the result on
  461. the stack.
  462.  
  463. In a binary AND operation, the result has only those bits set whose
  464. corresponding bits are set in both the operands.
  465.  
  466. SEE ALSO
  467.  
  468.      BNOT BOR BXOR
  469.  
  470. EXAMPLE
  471.  
  472.      1 1 BAND (1
  473.      2 1 BAND (0
  474.      2 3 BAND (3
  475.  
  476.                              - REFERENCE 3.9 -
  477.  
  478. WORD
  479.  
  480.      BEGIN
  481.  
  482. TEMPLATE
  483.  
  484.      BEGIN
  485.  
  486. DESCRIPTION
  487.  
  488. BEGIN marks the beginning of an indefinite loop. An indefinite loop can be
  489. any of the following:
  490.  
  491.      BEGIN..UNTIL
  492.      BEGIN . .AGAIN
  493.      BEGIN..WHILE..REPEAT
  494.  
  495. In the BEGIN..UNTIL loop a flag is tested at the end of each repetition of
  496. the loop. If the flag is TRUE, the loop terminates. Otherwise the loop
  497. repeats. Since the test is made at the end of the loop, the loop will
  498. always be executed at least once.
  499.  
  500. The BEGIN..AGAIN loop executes forever unless a QUIT or EXIT is executed.
  501.  
  502. In the BEGIN..WHILE..REPEAT loop the words between BEGIN and WHILE are
  503. first executed, and then a flag is tested. If the flag is TRUE, the words
  504. between WHILE and REPEAT are executed and the loop starts over. If the
  505. flag is FALSE, then execution skips to the word that comes after REPEAT.
  506.  
  507. Indefinite loops can be nested.
  508.  
  509. Note:
  510.  
  511. Can only be used inside a word definition.
  512.  
  513. SEE ALSO
  514.  
  515.      UNTIL AGAIN WHILE REPEAT QUIT EXIT
  516.  
  517. EXAMPLE
  518.  
  519.      : BeginUntil
  520.         BEGIN
  521.           "YeslNo" "Cancel Loop ?" GET_KEY
  522.         UNTIL
  523.      ;
  524.  
  525.      : BeginAgain
  526.         BEGIN
  527.           "YeslNo" "Cancel Loop ?" GET_KEY
  528.         IF
  529.           QUIT
  530.         ENDIF
  531.       AGAIN
  532.      ;
  533.  
  534.      : BegWhlRpt
  535.         BEGIN
  536.           "YeslNo" "Continue ?" GET_KEY
  537.         WHILE
  538.           "hello" PUTS
  539.         REPEAT
  540.      ;
  541.  
  542. WORD
  543.  
  544.      BNOT
  545.  
  546. TEMPLATE
  547.  
  548.      i1 BNOT i
  549.  
  550. DESCRIPTION
  551.  
  552. Inverts the bits of a integer value on the stack. Any bits in the integer
  553. value that are set (1) are reset, and any bits that are reset (0) are set.
  554.  
  555. SEE ALSO
  556.  
  557.      BAND BOR BXOR
  558.  
  559.                             - REFERENCE 3.10 -
  560.  
  561. WORD
  562.  
  563.      BOR
  564.  
  565. TEMPLATE
  566.  
  567.      i2 i1 BOR i
  568.  
  569. DESCRIPTION
  570.  
  571. Makes a binary OR operation on the two operands and puts the result on
  572. the stack.
  573.  
  574. In a binary OR operation the result has all those bits set that have a
  575. corresponding bit set in either or both of the operands.
  576.  
  577. SEE ALSO
  578.  
  579.      BNOT BAND BXOR
  580.  
  581. WORD
  582.  
  583.      BXOR
  584.  
  585. TEMPLATE
  586.  
  587.      i2 i1 BXOR i
  588.  
  589. DESCRIPTION
  590.  
  591. Makes a binary XOR (exclusive or) operation on the two operands and puts
  592. the result on the stack.
  593.  
  594. In a binary XOR operation the result has those bits set that have a
  595. corresponding bit set in only one of the operands.
  596.  
  597. SEE ALSO
  598.  
  599.      BNOT BAND BOR
  600.  
  601. WORD
  602.  
  603.      CAT
  604.  
  605. TEMPLATE
  606.  
  607.      s2 s1 CAT
  608.  
  609. DESCRIPTION
  610.  
  611. Concatenates two strings. Takes two pointers s1 and s2, and joins the
  612. string pointed to by s2 to the end of string pointed to by s1.
  613.  
  614. The result is stored in s1.
  615.  
  616. EXAMPLE
  617.  
  618.      30 STRING NAME
  619.  
  620.      "Mary" NAME CPY
  621.      " Smith" NAME CAT
  622.      NAME PUTS
  623.  
  624. SEE ALSO
  625.  
  626.      CPY PUTS SPRINTF STRING
  627.  
  628. WORD
  629.  
  630.      CONSTANT
  631.  
  632. TEMPLATE
  633.  
  634.      i CONSTANT name
  635.  
  636. DESCRIPTION
  637.  
  638. Defines a named integer constant and initializes it to the value popped
  639. off the stack.
  640.  
  641. When the constant is later referenced by entering it's name, the value of
  642. the constant is pushed onto the stack.
  643.  
  644. Note:
  645.  
  646. This word is usually used outside word definitions.
  647.  
  648.                             - REFERENCE 3.11 -
  649.  
  650. SEE ALSO
  651.  
  652. VARIABLE FVARIABLE FCONSTANT
  653.  
  654. WORD
  655.  
  656.      COS
  657.  
  658. TEMPLATE
  659.  
  660.      f1 COS f
  661.  
  662. DESCRIPTION
  663.  
  664. Calculates the cosine of the stack top item. The operand must be in
  665. radians.
  666.  
  667. SEE ALSO
  668.  
  669.      SIN
  670.  
  671. EXAMPLE
  672.  
  673.      3.16 SIN F.
  674.  
  675. WORD
  676.  
  677.      CPY
  678.  
  679. TEMPLATE
  680.  
  681.      s2 s1 CPY
  682.  
  683. DESCRIPTION
  684.  
  685. Copies a string. Takes two pointers s1 and s2, and copies the string
  686. pointed to by s2 to the string pointed to by s1.
  687.  
  688. SEE ALSO
  689.  
  690.      CAT PUTS SPRINTF STRING
  691.  
  692. EXAMPLE
  693.  
  694.      100 STRING sBuf
  695.      "Hello world" sBuf CPY
  696.      sBuf PUTS
  697.  
  698. WORD
  699.  
  700.      DEPTH
  701.  
  702. TEMPLATE
  703.  
  704.      DEPTH i
  705.  
  706. DESCRIPTION
  707.  
  708. Puts the count of the stack items onto the stack.
  709.  
  710. SEE ALSO
  711.  
  712.      RDEPTH
  713.  
  714. WORD
  715.  
  716.      DO
  717.  
  718. TEMPLATE
  719.  
  720.      i2 i1 DO
  721.  
  722. DESCRIPTION
  723.  
  724. Begins a definite loop, either DO..LOOP or DO..+LOOP A definite loop
  725. executes the words inside the loop a specified number of times.
  726.  
  727. The beginning (i1) and ending (i2) values for the loop variable are put
  728. on the stack before the word DO. The loop variable can be referenced using
  729. the words I, J or K depending on the nesting level.
  730.  
  731. Note:
  732. Can only be used inside a word definition.
  733.  
  734.                             - REFERENCE 3.12 -
  735.  
  736. EXAMPLE
  737.  
  738.      : 5Times
  739.       5 0 DO
  740.         I .
  741.       LOOP
  742.      ;
  743.  
  744. SEE ALSO
  745.  
  746.      LOOP +LOOP I J K
  747.  
  748. WORD
  749.  
  750.      DROP
  751.  
  752. TEMPLATE
  753.  
  754.      e DROP
  755.  
  756. DESCRIPTION
  757.  
  758. Removes the top value from the stack.
  759.  
  760. WORD
  761.  
  762.      DUP
  763.  
  764. TEMPLATE
  765.  
  766.      e DUP e e
  767.  
  768. DESCRIPTION
  769.  
  770. Duplicates the stack top value retaining its type (i.e. integer or
  771. floating-point).
  772.  
  773. SEE ALSO
  774.  
  775.      ?DUP
  776.  
  777. WORD
  778.  
  779.      ELSE
  780.  
  781. TEMPLATE
  782.  
  783.      ELSE
  784.  
  785. DESCRIPTION
  786.  
  787. In a conditional structure, marks the beginning of the block that is to
  788. be executed when the condition fails (i.e the flag tested is FALSE).
  789.  
  790. Note:
  791. Can only be used inside a word definition.
  792.  
  793. EXAMPLE
  794.  
  795.      : ABS ( i ABS i )
  796.       DUP
  797.       0 >=
  798.       IF
  799.       ELSE
  800.         -1 *
  801.       ENDIF
  802.      ;
  803.  
  804. SEE ALSO
  805.  
  806.      IF ENDIF
  807.  
  808. WORD
  809.  
  810.      EMIT
  811.  
  812. TEMPLATE
  813.  
  814.      i EMIT
  815.  
  816. DESCRIPTION
  817.  
  818. Prints the ASCII character corresponding to the first byte of the top
  819. stack value.
  820.  
  821.                             - REFERENCE 3.13 -
  822.  
  823. EXAMPLE
  824.  
  825.      : CR
  826.       13 EMIT
  827.       10 EMIT
  828.      ; ( carriage return and line feed )
  829.  
  830.      "Hello" PUTS CR "World" PUTS CR
  831.  
  832. WORD
  833.  
  834.      ENDIF
  835.  
  836. TEMPLATE
  837.  
  838.      ENDIF
  839.  
  840. DESCRIPTION
  841.  
  842. Ends a conditional structure, either IF..ENDIF or IF..ELSE..ENDIF.
  843.  
  844. Note:
  845. Can only be used inside a word definition.
  846.  
  847. SEE ALSO
  848.  
  849.      IF ELSE
  850.  
  851. WORD
  852.  
  853.      ERROR
  854.  
  855. TEMPLATE
  856.  
  857.      sErrorMsg ERROR
  858.  
  859. PARAMETERS
  860.  
  861.      sErrorMsg - error message to be printed
  862.  
  863. DESCRIPTION
  864.  
  865. Terminates the program as if an error had occurred and prints out the
  866. given error message.
  867.  
  868. RPL programs can use this word for terminating code execution in
  869. situations which are not interpreted as errors by RPL. For example, if a
  870. procedural texture handler realizes that it cannot generate required color
  871. information for the renderer, it can call this word in order to cancel
  872. rendering.
  873.  
  874. If the sErrorMsg is 0, no error message is printed.
  875.  
  876. EXAMPLE
  877.  
  878.      RX RC @ IF
  879.         "Return value is not zero" ERROR
  880.      ENDIF
  881.  
  882. WORD
  883.  
  884.      EVAL
  885.  
  886. TEMPLATE
  887.  
  888.      sExpr EVAL f
  889.  
  890. DESCRIPTION
  891.  
  892. Evaluates an algebraic expression contained in the string pointed to by
  893. sExpr, and pushes the result on the stack. If the string contains multiple
  894. expressions then the last one evaluated determines the return value.
  895.  
  896.                             - REFERENCE 3.14 -
  897.  
  898. The following operators are supported by the EVAL word:
  899.  
  900. ,    - separator for multiple expressions
  901. (    - parentheses for controlling evaluation precedence
  902. )    -
  903. +    - add
  904. -    - subtract
  905. *    - multiply
  906. /    - divide
  907. -    - negate
  908. ^    - power
  909. %    - modulo
  910. +=   - x+=0.1 is same as x = x + 0.1
  911. -=   -
  912. *=   -
  913. /=   -
  914. &&   - logical AND
  915. II   - logical OR
  916. =    - assignment
  917. ==   - comparison is equal
  918. >    - comparison greater than
  919. <    -
  920. >=   - comparison greater or equal
  921. <=   -
  922. !=   - comparison not equal
  923.  
  924. =if() - =if(a>b,t,f) if a > b then return t, otherwise f
  925.  
  926. abs() - absolute value, for example abs(-10) produces 10
  927. ceil() - returns smallest integer value which is >= x
  928. data() - interface to object and material data structures.
  929. exp() - exp(x) returns e^x
  930. floor() - greatest integer value which is <= x Ig() - log to base 10
  931. In() - natural log
  932. max() - returns the greatest from the list
  933. min() - min(a,b,c,1,2) returns the smallest from the list a,b,c etc.
  934. sgn() - sign, sgn(x) is -1 if x < 0, 0 if x = 0 and 1 if x > 0
  935. sqrt() - square root
  936. sum() - sum(1,2,3) = 6
  937.  
  938. cos() - trigonometric functions
  939. sin() -
  940. tan() -
  941.  
  942. acos() - inverse trigonometric functions
  943. asin() -
  944. atan() -
  945.  
  946. ceil() & floor() examples:
  947.  
  948.      ceil(1.4) returns 2,
  949.      floor(1.4) returns 1 and
  950.      ceil(-1.4) returns -1
  951.  
  952. data()
  953.  
  954. By using the data() operator of EVAL, the properties of objects and
  955. materials and some global system values can be accessed.
  956.  
  957. THE APPROPRIATE DATA STRUCTURE MUST BE LOCKED USING O LOCK OR MAT LOCK
  958. BEFORE USING THE data() OPERATOR TO ACCESS THEM.
  959.  
  960. Objects
  961.  
  962. The syntax for accessing object attributes through EVAL is:
  963.  
  964.      "data(/path/name->prop)" EVAL f
  965.  
  966. EVAL again returns the address of the property if used without any
  967. expression assignment.
  968.  
  969. Where:
  970.  
  971. "/path/name" - Objects name including full absolute path. If the first
  972. character in data() is a slash, the name is assumed to refer to an object.
  973. Otherwise it is considered to be a material reference.
  974.  
  975.                             - REFERENCE 3.15 -
  976.  
  977. "prop" - One of the following:
  978.  
  979. R, G, B - Red, Green, or Blue color signal (0 .. 255)
  980.  
  981. A       - Alpha information
  982.  
  983. reg     - A register color for wire frame representation
  984.  
  985. ptrn    - A pattern for the line. Value must be between 0 and 65535 and
  986.           each bit in pattern represents one pixel in the line to be
  987.           drawn. If the first bit is set, then the first pixel in the line
  988.           will be set. Thus a value of 65536 produces a solid line.
  989.  
  990. Materials
  991.  
  992. The syntax is as follows:
  993.  
  994.      "data(name->prop)" EVAL f
  995.  
  996. If used without any expression assignment then EVAL will return the
  997. address of the material property.
  998.  
  999. Where:
  1000.  
  1001. "name"  - The name of the material in the Material Library to be accessed.
  1002.  
  1003. "prop"  - Any of the material properties listed below:
  1004.  
  1005. name    - name (string field)
  1006. imag    - image (string field)
  1007.  
  1008. splu    - spline mapping u/v/width/height (0.0 .. 1.0)
  1009. splv
  1010. splw
  1011. splh
  1012. frex    - texture frequency x (positive integer)
  1013. frey    - texture frequency y (positive integer)
  1014.  
  1015. tr.r    - transparency color R, G, B (0 .. 255)
  1016. tr.g
  1017. tr.b
  1018.  
  1019. spec    - specularity
  1020. sbri    - specular brightness
  1021. bril    - brilliance
  1022. tran    - transparency
  1023. turb    - turbidity
  1024. tbsa    - turbidity saturation
  1025. refr    - refraction
  1026. roug    - roughness
  1027. dith    - dithering scale
  1028. bump    - bump height (-100 .. 100)
  1029. effc    - effect
  1030.  
  1031. maph    - mapping handler
  1032. mapa    - constants for the mapping handler (floating-point)
  1033. mapb
  1034.  
  1035. scoh    - scope handler
  1036. scoa
  1037. scob
  1038.  
  1039. bmph    - bump handler
  1040. bmpa
  1041. bmpb
  1042.  
  1043. colh    - color handler
  1044. cola
  1045. colb
  1046.  
  1047. indh    - index handler
  1048. inda
  1049. indb
  1050.  
  1051. Values for all properties can vary between 0 .. 100, unless otherwise
  1052. specified above.
  1053.  
  1054. Handlers can contain values 0,1. 2 etc. depending on the number of choices
  1055. in the corresponding cycle gadget in the Material Editor window (Default
  1056. = 0, etc.).
  1057.  
  1058.                             - REFERENCE 3.16 -
  1059.  
  1060. Global Data
  1061.  
  1062. Global system data can also be accessed through EVAL. The following
  1063. variables are defined for this purpose:
  1064.  
  1065. T    - Current Time (floating-point value)
  1066. Res  - Animation Resolution for animation (integer)
  1067. Frm  - Current Animation Frame (integer)
  1068.  
  1069. EXAMPLE
  1070.  
  1071.      FVARIABLE X
  1072.  
  1073.      0.02 X F!
  1074.      "0.5 * sin(2 * X) + cos(X)" EVAL F.
  1075.  
  1076.      "Real:Textures/wood1"
  1077.      "data(wood->image)" EVAL CPY
  1078.  
  1079.      "data(/Root/rectangle->R)=255" EVAL
  1080.  
  1081.      ( print out the number of frames )
  1082.      "Res" EVAL F.
  1083.  
  1084.      ( reset the frame counter and discard )
  1085.      "Frm=0" EVAL DROP ( the return value )
  1086.  
  1087. WORD
  1088.  
  1089.      EXECUTE
  1090.  
  1091. TEMPLATE
  1092.  
  1093.      aCFA EXECUTE
  1094.  
  1095. DESCRIPTION
  1096.  
  1097. Executes a word given it's CFA.
  1098.  
  1099. SEE ALSO
  1100.  
  1101.      &?&
  1102.  
  1103. WORD
  1104.  
  1105.      EXIT
  1106.  
  1107. TEMPLATE
  1108.  
  1109.      EXIT
  1110.  
  1111. DESCRIPTION
  1112.  
  1113. Terminates the execution of the current word, and returns control to the
  1114. word that executed the current word.
  1115.  
  1116. Note:
  1117. Can only be used inside a word definition.
  1118.  
  1119. EXAMPLE
  1120.  
  1121.      : TEST
  1122.       DUP
  1123.       5 < IF
  1124.         DROP
  1125.         EXIT
  1126.       ENDIF
  1127.       .
  1128.      ;
  1129.  
  1130.      : LUP
  1131.       10 0 DO
  1132.         I TEST
  1133.       LOOP
  1134.      ;
  1135.  
  1136. SEE ALSO
  1137.  
  1138.      QUIT
  1139.  
  1140. WORD
  1141.  
  1142.      EXP
  1143.  
  1144. TEMPLATE
  1145.  
  1146.      fPar EXP fRet
  1147.  
  1148. DESCRIPTION
  1149.  
  1150. Raises the natural logarithm base E to the fPar power.
  1151.  
  1152.                             - REFERENCE 3.17 -
  1153.  
  1154. WORD
  1155.  
  1156.      F.
  1157.  
  1158. TEMPLATE
  1159.  
  1160.      f F.
  1161.  
  1162. DESCRIPTION
  1163.  
  1164. Takes a floating-point value off the stack and prints it.
  1165.  
  1166. SEE ALSO
  1167.  
  1168.      .H.O.B.
  1169.  
  1170. WORD
  1171.  
  1172.      F!
  1173.  
  1174. TEMPLATE
  1175.  
  1176.      f aFloat F!
  1177.  
  1178. DESCRIPTION
  1179.  
  1180. Stores a value in a floating-point variable. Takes the address of the
  1181. variable and the value to be stored off the stack.
  1182.  
  1183. Note:
  1184. See the Note: on !
  1185.  
  1186. SEE ALSO
  1187.  
  1188.      F@ FVARIABLE
  1189.  
  1190. WORD
  1191.  
  1192.      F+
  1193.  
  1194. TEMPLATE
  1195.  
  1196.      f2f1F+f
  1197.  
  1198. DESCRIPTION
  1199.  
  1200. Takes two floating-point values off the stack, adds them, and puts the
  1201. sum on the stack.
  1202.  
  1203. WORD
  1204.  
  1205.      F-
  1206.  
  1207. TEMPLATE
  1208.  
  1209.      f2 f1 F- f
  1210.  
  1211. DESCRIPTION
  1212.  
  1213. Takes two integers off the stack, subtracts the stack top value from the
  1214. second one, and puts the difference on the stack.
  1215.  
  1216. WORD
  1217.  
  1218.      F*
  1219.  
  1220. TEMPLATE
  1221.  
  1222.      f2 f1 F* f
  1223.  
  1224. DESCRIPTION
  1225.  
  1226. Takes two floating-point values off the stack, multiplies them, and puts
  1227. the product on the stack.
  1228.  
  1229. WORD
  1230.  
  1231.      F/
  1232.  
  1233. TEMPLATE
  1234.  
  1235.      f2 f1 F/ f
  1236.  
  1237. DESCRIPTION
  1238.  
  1239. Takes two floating point values off the stack, divides the second value on
  1240. the stack by the stack top item, and puts the quotient on the stack.
  1241.  
  1242.                             - REFERENCE 3.18 -
  1243.  
  1244. WORD
  1245.  
  1246.      F<
  1247.  
  1248. TEMPLATE
  1249.  
  1250.      f2 f1 F< I
  1251.  
  1252. DESCRIPTION
  1253.  
  1254. Takes two floating-point values off the stack and compares them. If the
  1255. second value is less than the first value, F < puts TRUE on the stack,
  1256. otherwise FALSE is put on the stack.
  1257.  
  1258. WORD
  1259.  
  1260.      F<=
  1261.  
  1262. TEMPLATE
  1263.  
  1264.      f2 f1 F<= I
  1265.  
  1266. DESCRIPTION
  1267.  
  1268. Takes two floating-point values off the stack and compares them. If the
  1269. second value is less than or equal to the first value, F<= puts TRUE on
  1270. the stack, otherwise FALSE is put on the stack.
  1271.  
  1272. WORD
  1273.  
  1274.      F<>
  1275.  
  1276. TEMPLATE
  1277.  
  1278.      f2 f1 F<> I
  1279.  
  1280. DESCRIPTION
  1281.  
  1282. Takes two floating-point values off the stack and compares them. If the
  1283. second value is not equal to the first value, F <> puts TRUE on the stack,
  1284. otherwise FALSE is put on the stack.
  1285.  
  1286. WORD
  1287.  
  1288.      F=
  1289.  
  1290. TEMPLATE
  1291.  
  1292.      f2 f1 F= I
  1293.  
  1294. DESCRIPTION
  1295.  
  1296. Takes two floating-point values off the stack and compares them. If the
  1297. values are equal, F= puts TRUE on the stack, otherwise FALSE is put on
  1298. the stack.
  1299.  
  1300. WORD
  1301.  
  1302.      F>
  1303.  
  1304. TEMPLATE
  1305.  
  1306.      f2 f1 F> I
  1307.  
  1308. DESCRIPTION
  1309.  
  1310. Takes two floating-point values off the stack and compares them. If the
  1311. second value is greater than the first value, F > puts TRUE on the stack,
  1312. otherwise FALSE is put on the stack.
  1313.  
  1314. WORD
  1315.  
  1316.      F>=
  1317.  
  1318. TEMPLATE
  1319.  
  1320.      f2 f1 F>= I
  1321.  
  1322. DESCRIPTION
  1323.  
  1324. Takes two floating-point values off the stack and compares them. If the
  1325. second value is greater than or equal to the first value, F>= puts TRUE
  1326. on the stack, otherwise FALSE is put on the stack.
  1327.  
  1328.                             - REFERENCE 3.19 -
  1329.  
  1330. WORD
  1331.  
  1332.      F>I
  1333.  
  1334. TEMPLATE
  1335.  
  1336.      f F>I i
  1337.  
  1338. DESCRIPTION
  1339.  
  1340. Takes a floating point value off the stack and pushes a corresponding
  1341. integer value on the stack.
  1342.  
  1343. SEE ALSO
  1344.  
  1345.      I>F
  1346.  
  1347. WORD
  1348.  
  1349.      F@
  1350.  
  1351. TEMPLATE
  1352.  
  1353.      aFloat F@ f
  1354.  
  1355. DESCRIPTION
  1356.  
  1357. Fetches the value of a floating-point variable and puts the value on the
  1358. stack top. The address of the floating-point variable must be on the stack
  1359. top before calling this word.
  1360.  
  1361. Note:
  1362. See the Note: on !
  1363.  
  1364. SEE ALSO
  1365.  
  1366.      F! FVARIABLE
  1367.  
  1368. WORD
  1369.  
  1370.      FCONSTANT
  1371.  
  1372. TEMPLATE
  1373.  
  1374.      f FCONSTANT name
  1375.  
  1376. DESCRIPTION
  1377.  
  1378. Defines a named floating-point constant and initializes it to the value
  1379. popped off the stack.
  1380.  
  1381. When the constant is later referenced by entering it's name, the value of
  1382. the constant is pushed onto the stack.
  1383.  
  1384. Note:
  1385. This word is usually used outside word definitions.
  1386.  
  1387. SEE ALSO
  1388.  
  1389.      FVARIABLE VARIABLE CONSTANT
  1390.  
  1391. WORD
  1392.  
  1393.      FMOD
  1394.  
  1395. TEMPLATE
  1396.  
  1397.      f2 f1 FMOD f
  1398.  
  1399. DESCRIPTION
  1400.  
  1401. Takes two floating point values off the stack, divides the second value
  1402. on the stack by the stack top item, and puts the remainder of the division
  1403. on the stack.
  1404.  
  1405. WORD
  1406.  
  1407.      FORGET
  1408.  
  1409. TEMPLATE
  1410.  
  1411.      FORGET name
  1412.  
  1413. DESCRIPTION
  1414.  
  1415. Removes definitions from the vocabulary. All words that have been defined
  1416. after the given word, as well as the word itself, are removed from the
  1417. Vocabulary Stack.
  1418.  
  1419.                             - REFERENCE 3.20 -
  1420.  
  1421. WORD
  1422.  
  1423.      FVARIABLE
  1424.  
  1425. TEMPLATE
  1426.  
  1427.      FVARIABLE name
  1428.  
  1429. DESCRIPTION
  1430.  
  1431. Defines a named floating-point variable. The name of the variable must
  1432. follow the word FVARIABLE. The RPL interpreter allocates memory from the
  1433. Vocabulary Stack for storing the variable. The variable is initialized
  1434. as 0.0.
  1435.  
  1436. When the variable is later referenced by entering it's name, the address
  1437. of the memory location that stores the variable's value is pushed onto the
  1438. stack.
  1439.  
  1440. Note:
  1441. This word is usually used outside word definitions.
  1442.  
  1443. SEE ALSO
  1444.  
  1445.      F! F@ FCONSTANT VARIABLE CONSTANT
  1446.  
  1447. WORD
  1448.  
  1449.      H.
  1450.  
  1451. TEMPLATE
  1452.  
  1453.      i H.
  1454.  
  1455. DESCRIPTION
  1456.  
  1457. Takes an integer off the stack and prints it as a hexadecimal number.
  1458.  
  1459. SEE ALSO
  1460.  
  1461.      .O.B.
  1462.  
  1463. WORD
  1464.  
  1465.      I
  1466.  
  1467. TEMPLATE
  1468.  
  1469.      I i
  1470.  
  1471. DESCRIPTION
  1472.  
  1473. Inside a definite loop copies the value of the loop variable of the
  1474. innermost loop onto the stack.
  1475.  
  1476. Note:
  1477. Can only be used inside a word definition.
  1478.  
  1479. SEE ALSO
  1480.  
  1481.      J K
  1482.  
  1483.  
  1484.  
  1485. WORD
  1486.  
  1487.      I>F
  1488.  
  1489. TEMPLATE
  1490.  
  1491.      i I>F f
  1492.  
  1493. DESCRIPTION
  1494.  
  1495. Takes an integer value off the stack and pushes a corresponding
  1496. floating-point value onto the stack.
  1497.  
  1498. SEE ALSO
  1499.  
  1500.      F>I
  1501.  
  1502. WORD
  1503.  
  1504.      IF
  1505.  
  1506. TEMPLATE
  1507.  
  1508.      I IF
  1509.  
  1510.                             - REFERENCE 3.21 -
  1511.  
  1512. DESCRIPTION
  1513.  
  1514. Begins a conditional structure, either IF..ENDIF or IF..ELSE..ENDIF.
  1515.  
  1516. In the former case, if the flag is TRUE then the words between IF and
  1517. ENDIF are executed, and then the words after ENDIF. If the flag is FALSE,
  1518. execution skips the words between IF and ENDIF.
  1519.  
  1520. In the latter case, if the flag is TRUE then the words between IF and
  1521. ENDIF are executed and then the words after ENDIF. If the flag is FALSE,
  1522. the words between ELSE and ENDIF are executed and then the words after
  1523. ENDIF.
  1524.  
  1525. Conditional structures may be nested.
  1526.  
  1527. Note:
  1528. Can only be used inside a word definition.
  1529.  
  1530. EXAMPLE
  1531.  
  1532.      : PrintSign
  1533.       DUP 0 < IF
  1534.         DROP
  1535.         "-" PUTS
  1536.       ELSE
  1537.         0 > IF
  1538.         "+" PUTS
  1539.         ENDIF
  1540.       ENDIF
  1541.      ;
  1542.  
  1543.      -2 PrintSign
  1544.      3 PrintSign
  1545.      0 PrintSign
  1546.  
  1547. SEE ALSO
  1548.  
  1549.      ELSE ENDIF
  1550.  
  1551. WORD
  1552.  
  1553.      J
  1554.  
  1555. TEMPLATE
  1556.  
  1557.      J i
  1558.  
  1559. DESCRIPTION
  1560.  
  1561. Inside a definite loop copies the value of the loop variable of the second
  1562. innermost loop onto the stack.
  1563.  
  1564. Note:
  1565. Can only be used inside a word definition.
  1566.  
  1567. EXAMPLE
  1568.  
  1569.      ( line feed and carriage return )
  1570.      : CR 10 EMIT 13 EMIT ;
  1571.  
  1572.      : MULT TABLE
  1573.       11 1 DO
  1574.         11 1 DO
  1575.           I J * .
  1576.         LOOP
  1577.         CR
  1578.       LOOP
  1579.      ;
  1580.  
  1581. SEE ALSO
  1582.  
  1583.      I K
  1584.  
  1585. WORD
  1586.  
  1587.      K
  1588.  
  1589. TEMPLATE
  1590.  
  1591.      K i
  1592.  
  1593. DESCRIPTION
  1594.  
  1595. Inside a definite loop copies the value of the loop variable of the third
  1596. innermost loop onto the stack.
  1597.  
  1598.                             - REFERENCE 3.22 -
  1599.  
  1600. Note:
  1601.  
  1602. Can only be used inside a word definition.
  1603.  
  1604. SEE ALSO
  1605.  
  1606.      I J
  1607.  
  1608. WORD
  1609.  
  1610.      LEAVE
  1611.  
  1612. TEMPLATE
  1613.  
  1614.      LEAVE
  1615.  
  1616. DESCRIPTION
  1617.  
  1618. Terminates a definite loop prematurely. The word LEAVE causes the definite
  1619. loop to terminate at the next LOOP or +LOOP.
  1620.  
  1621. Note:
  1622.  
  1623. Can only be used inside a word definition.
  1624.  
  1625. EXAMPLE
  1626.  
  1627.      ( terminates when I squared exceeds 50 )
  1628.      : LUP
  1629.       10 0 DO
  1630.         I DUP * DUP
  1631.         50 > IF
  1632.           LEAVE
  1633.         ELSE
  1634.           DROP
  1635.         ENDIF
  1636.           .
  1637.       LOOP
  1638.      ;
  1639.  
  1640. SEE ALSO
  1641.  
  1642.      EXIT QUIT
  1643.  
  1644. WORD
  1645.  
  1646.      LOAD
  1647.  
  1648. TEMPLATE
  1649.  
  1650.      sFile LOAD
  1651.  
  1652. DESCRIPTION
  1653.  
  1654. Loads a file containing RPL code. The effect is the same as if the text
  1655. had been entered in the RPL window. The address of the string containing
  1656. the file name is taken off the stack top.
  1657.  
  1658. WORD
  1659.  
  1660.      LOG
  1661.  
  1662. TEMPLATE
  1663.  
  1664.      fPar LOG fRet
  1665.  
  1666. PARAMETER
  1667.  
  1668.      fPar - positive parameter value
  1669.  
  1670. DESCRIPTION
  1671.  
  1672. Takes the base E logarithm. The parameter fPar must be a positive value.
  1673.  
  1674. SEE ALSO
  1675.  
  1676.      LOG10
  1677.  
  1678. WORD
  1679.  
  1680.      LOG10
  1681.  
  1682. TEMPLATE
  1683.  
  1684.      fPar LOG10 fRet
  1685.  
  1686. PARAMETER
  1687.  
  1688. fPar - positive parameter value
  1689.  
  1690.                             - REFERENCE 3.23 -
  1691.  
  1692. DESCRIPTION
  1693.  
  1694. Takes the base 10 logarithm. The parameter fPar must be a positive value.
  1695.  
  1696. SEE ALSO
  1697.  
  1698.      LOG
  1699.  
  1700. WORD
  1701.  
  1702.      LOOP
  1703.  
  1704. TEMPLATE
  1705.  
  1706.      LOOP
  1707.  
  1708. DESCRIPTION
  1709.  
  1710. Ends a definite DO..LOOP loop.
  1711.  
  1712. Note:
  1713. Can only be used inside a word definition.
  1714.  
  1715. SEE ALSO
  1716.  
  1717.      DO +LOOP I J K
  1718.  
  1719. WORD
  1720.  
  1721.      +LOOP
  1722.  
  1723. TEMPLATE
  1724.  
  1725.      i +LOOP
  1726.  
  1727. DESCRIPTION
  1728.  
  1729. Ends a definite DO.. +LOOP loop. This word is used when the loop variable
  1730. must be incremented by values other than 1. +LOOP takes the stack top
  1731. value and adds it to the loop variable. If the ending value is greater
  1732. than the beginning value, then the loop is exited if the loop variable
  1733. becomes greater than or equal to the ending value.
  1734.  
  1735. If the ending value is less than the beginning value, then the DO..+LOOP
  1736. is exited when the loop variable becomes less than or equal to the ending
  1737. value.
  1738.  
  1739. Note:
  1740. Can only be used inside a word definition.
  1741.  
  1742. EXAMPLE
  1743.  
  1744.      ( use negative increment )
  1745.      : Down DO I. -1, + LOOP;
  1746.      0 5 Down
  1747.  
  1748. SEE ALSO
  1749.  
  1750.      DO LOOP I J K
  1751.  
  1752. WORD
  1753.  
  1754.      MOD
  1755.  
  1756. TEMPLATE
  1757.  
  1758.      i2 i1 MOD i
  1759.  
  1760. DESCRIPTION
  1761.  
  1762. Takes two integers off the stack, divides the second value on the stack by
  1763. the stack top item, and puts the remainder of the division on the stack.
  1764.  
  1765. WORD
  1766.  
  1767.      NOT
  1768.  
  1769. TEMPLATE
  1770.  
  1771.      I1 NOT I2
  1772.  
  1773.                             - REFERENCE 3.24 -
  1774.  
  1775. DESCRIPTION
  1776.  
  1777. Inverts a boolean value on the stack. If the flag is TRUE, it is replaced
  1778. by FALSE and vice versa. Any value that is not equal to zero is regarded
  1779. as TRUE. A value of zero is regarded as FALSE.
  1780.  
  1781. SEE ALSO
  1782.  
  1783.      IF
  1784.  
  1785. WORD
  1786.  
  1787.      O.
  1788.  
  1789. TEMPLATE
  1790.  
  1791.      iO.
  1792.  
  1793. DESCRIPTION
  1794.  
  1795. Takes an integer off the stack and prints it as an octal number.
  1796.  
  1797. SEE ALSO
  1798.  
  1799.      .H.B.
  1800.  
  1801. WORD
  1802.  
  1803.      OR
  1804.  
  1805. TEMPLATE
  1806.  
  1807.      I2 I1 OR I
  1808.  
  1809. DESCRIPTION
  1810.  
  1811. Takes two boolean flags off the stack and, if either one (or both) is
  1812. TRUE, puts TRUE on the stack, otherwise puts FALSE on the stack.
  1813.  
  1814. SEE ALSO
  1815.  
  1816.      IF AND XOR
  1817.  
  1818. WORD
  1819.  
  1820.      OVER
  1821.  
  1822. TEMPLATE
  1823.  
  1824.      e2 e1 OVER e2 e1 e2
  1825.  
  1826. DESCRIPTION
  1827.  
  1828. Copies the second stack item to the stack top.
  1829.  
  1830. SEE ALSO
  1831.  
  1832.      ROT ROLL PICK SWAP
  1833.  
  1834. WORD
  1835.  
  1836.      PICK
  1837.  
  1838. TEMPLATE
  1839.  
  1840.      i PICK e
  1841.  
  1842. DESCRIPTION
  1843.  
  1844. Gets a copy of a value on the stack. The copied value will be the i'th
  1845. value BEFORE the operand for PICK was entered.
  1846.  
  1847. EXAMPLE
  1848.  
  1849.      10 9 8 7 .S
  1850.      4 PICK
  1851.      .S
  1852.  
  1853. SEE ALSO
  1854.  
  1855.      ROLL ROT SWAP OVER
  1856.  
  1857. WORD
  1858.  
  1859.      POW
  1860.  
  1861. TEMPLATE
  1862.  
  1863.      fPow fVal POW fRet
  1864.  
  1865.                             - REFERENCE 3.25 -
  1866.  
  1867. DESCRIPTION
  1868.  
  1869. Raises fVal to the fPow power.
  1870.  
  1871. EXAMPLE
  1872.  
  1873.      2 3 POW . ( 9
  1874.      3 4 POW . ( 64
  1875.  
  1876. WORD
  1877.  
  1878.      PUTS
  1879.  
  1880. TEMPLATE
  1881.  
  1882.      sPUTS
  1883.  
  1884. DESCRIPTION
  1885.  
  1886. Prints a string pointed to by s.
  1887.  
  1888. SEE ALSO
  1889.  
  1890.      CAT CPY SPRINTF STRING
  1891.  
  1892. WORD
  1893.  
  1894.      QUIT
  1895.  
  1896. TEMPLATE
  1897.  
  1898.      QUIT
  1899.  
  1900. DESCRIPTION
  1901.  
  1902. QUIT terminates execution of the current word, empties all stacks and
  1903. returns control to the interpreter.
  1904.  
  1905. Note:
  1906. Can only be used inside a word definition.
  1907.  
  1908. SEE ALSO
  1909.  
  1910.      EXIT
  1911.  
  1912. WORD
  1913.  
  1914.      RO
  1915.  
  1916. TEMPLATE
  1917.  
  1918.      RO i
  1919.  
  1920. DESCRIPTION
  1921.  
  1922. Puts on the stack the starting address of the return stack. This is the
  1923. address where the first item (usually a return address) on return stack
  1924. is stored.
  1925.  
  1926. SEE ALSO
  1927.  
  1928.      RDEPTH
  1929.  
  1930. WORD
  1931.  
  1932.      R>
  1933.  
  1934. TEMPLATE
  1935.  
  1936.      R> i
  1937.  
  1938. DESCRIPTION
  1939.  
  1940. Takes an integer value off the return stack and pushes it onto the Operand
  1941. Stack.
  1942.  
  1943. SEE ALSO
  1944.  
  1945.      >R
  1946.  
  1947. WORD
  1948.  
  1949.      RANDOM
  1950.  
  1951. TEMPLATE
  1952.  
  1953.      RANDOM f
  1954.  
  1955.                             - REFERENCE 3.26 -
  1956.  
  1957. DESCRIPTION
  1958.  
  1959. Returns a floating-point value between 0.0 and 1.0 inclusive and pushes
  1960. it onto the stack.
  1961.  
  1962. WORD
  1963.  
  1964.      RDEPTH
  1965.  
  1966. TEMPLATE
  1967.  
  1968.      RDEPTH i
  1969.  
  1970. DESCRIPTION
  1971.  
  1972. Puts on the stack the count of the items on the return stack.
  1973.  
  1974. SEE ALSO
  1975.  
  1976.      DEPTH
  1977.  
  1978. WORD
  1979.  
  1980.      REPEAT
  1981.  
  1982. TEMPLATE
  1983.  
  1984.      REPEAT
  1985.  
  1986. DESCRIPTION
  1987.  
  1988. Marks the end of a BEGIN..WHILE..REPEAT loop.
  1989.  
  1990. Note:
  1991. Can only be used inside a word definition.
  1992.  
  1993. SEE ALSO
  1994.  
  1995.      BEGIN WHILE
  1996.  
  1997.                             - REFERENCE 3.27 -
  1998.  
  1999. WORD
  2000.  
  2001.      ROLL
  2002.  
  2003. TEMPLATE
  2004.  
  2005. described below
  2006.  
  2007. DESCRIPTION
  2008.  
  2009. The word ROLL is used to rotate a given number (i) of stack items so that
  2010. the i'th stack item becomes the stack top item and all the items between
  2011. the first and the i'th item are moved one position deeper in the stack.
  2012. The count i is on the stack top before executing ROLL.
  2013.  
  2014. EXAMPLE
  2015.  
  2016.      10 9 8 7 .S
  2017.      3 ROLL
  2018.      .S
  2019.  
  2020. SEE ALSO
  2021.  
  2022.      PICK ROT SWAP OVER
  2023.  
  2024. WORD
  2025.  
  2026.      ROT
  2027.  
  2028. TEMPLATE
  2029.  
  2030.      e3 e2 e1 ROT e1 e3 e2
  2031.  
  2032. DESCRIPTION
  2033.  
  2034. ROT rotates the three topmost stack values so that the third item becomes
  2035. the top item, and the first and the second item (counting from the stack
  2036. top) will be the second and the third stack item, respectively.
  2037.  
  2038. SEE ALSO
  2039.  
  2040.      ROLL SWAP OVER PICK
  2041.  
  2042.                             - REFERENCE 3.25 -
  2043.  
  2044. WORD
  2045.  
  2046.      SO
  2047.  
  2048. TEMPLATE
  2049.  
  2050.      SO i
  2051.  
  2052. DESCRIPTION
  2053.  
  2054. Puts on the stack the starting address of the operand stack. This is the
  2055. address where the first item on operand stack is stored.
  2056.  
  2057. SEE ALSO
  2058.  
  2059.      DEPTH
  2060.  
  2061. WORD
  2062.  
  2063.      SIN
  2064.  
  2065. TEMPLATE
  2066.  
  2067.      f1 SIN f2
  2068.  
  2069. DESCRIPTION
  2070.  
  2071. Calculates the sine of the stack top item. The operand must be in radians.
  2072.  
  2073. SEE ALSO
  2074.  
  2075.      COS
  2076.  
  2077. WORD
  2078.  
  2079.      SQRT
  2080.  
  2081. TEMPLATE
  2082.  
  2083.      fVal SQRT fRet
  2084.  
  2085. PARAMETER
  2086.  
  2087. fVal - Positive value
  2088.  
  2089. DESCRIPTION
  2090.  
  2091. Squareroot of fVal.
  2092.  
  2093. EXAMPLE
  2094.  
  2095.      9 SQRT . ( 3
  2096.      16 SQRT . ( 4
  2097.  
  2098. WORD
  2099.  
  2100.      SPRINTF
  2101.  
  2102. TEMPLATE
  2103.  
  2104.      e .. sFormat sResult SPRINTF
  2105.  
  2106. DESCRIPTION
  2107.  
  2108. This formats the operand list e . . using the format string specified by
  2109. sFormat and stores the result in the string whose address is sResult. The
  2110. operand list must be in REVERSE order as for all RPL word operands.
  2111.  
  2112. The format string s1 controls the output format as follows:
  2113.  
  2114. % start conversion specification.
  2115.  
  2116.   Then any of the following:
  2117.  
  2118. - left adjust operand in its field.
  2119.  
  2120. m digit string specifying minimum field width.
  2121.  
  2122. . separator from field width and next digit string.
  2123.  
  2124. n digit string specifying maximum number of characters or floating-point
  2125.   precision.
  2126.  
  2127.   Then a conversion character:
  2128.  
  2129. c Operand is taken as a single character.
  2130.  
  2131. d Operand is converted to decimal notation.
  2132.  
  2133.                             - REFERENCE 3.28 -
  2134.  
  2135. e Operand is taken as floating-point and converted to decimal.
  2136.  
  2137. f Operand is taken a floating-point and output as [-]mm.nnn where the
  2138.   number of digits for nnn is specified by the precision.
  2139.  
  2140. g Use %e or %f whichever is shorter.
  2141.  
  2142. o Operand is converted to unsigned octal notation.
  2143.  
  2144. s Operand must be a string, and is stored until precision specification or
  2145.   the end of the string is reached.
  2146.  
  2147. u Operand is converted to unsigned decimal notation.
  2148.  
  2149. x Operand is converted to unsigned hexadecimal notation.
  2150.  
  2151. Note:
  2152. For more information about this word refer to a "C" Language reference
  2153. manual.
  2154.  
  2155. EXAMPLE
  2156.  
  2157.      80 STRING Buffer
  2158.      31 "Hello, I am %d years old" Buffer SPRINTF
  2159.      Buffer PUTS
  2160.  
  2161. SEE ALSO
  2162.  
  2163.      CPY CAT PUTS STRING
  2164.  
  2165. WORD
  2166.  
  2167.      STRING
  2168.  
  2169. TEMPLATE
  2170.  
  2171.      i STRING name
  2172.  
  2173. DESCRIPTION
  2174.  
  2175. Allocates memory for a named string variable. The size of the memory to
  2176. be allocated is popped off the stack.
  2177.  
  2178. When the string variable is later referenced by entering it's name, the
  2179. address of the first character of the string is pushed onto the stack.
  2180.  
  2181. Note:
  2182. This word is usually used outside word definitions.
  2183.  
  2184. SEE ALSO
  2185.  
  2186.      CPY CAT PUTS SPRINTF
  2187.  
  2188. WORD
  2189.  
  2190.      SWAP
  2191.  
  2192. TEMPLATE
  2193.  
  2194.      e2 e1 SWAP e1 e2
  2195.  
  2196. DESCRIPTION
  2197.  
  2198. Changes the order of the two stack top values.
  2199.  
  2200. SEE ALSO
  2201.  
  2202.      ROT ROLL PICK OVER
  2203.  
  2204. WORD
  2205.  
  2206.      TAN
  2207.  
  2208. TEMPLATE
  2209.  
  2210.      f1 TAN f2
  2211.  
  2212. DESCRIPTION
  2213.  
  2214. Tangent function
  2215.  
  2216. SEE ALSO
  2217.  
  2218.      SIN, COS
  2219.  
  2220.                             - REFERENCE 3.29 -
  2221.  
  2222. WORD
  2223.  
  2224.      UNTIL
  2225.  
  2226. TEMPLATE
  2227.  
  2228.      I UNTIL
  2229.  
  2230. DESCRIPTION
  2231.  
  2232. Marks the end of a BEGIN..UNTIL loop. In the BEGIN..UNTIL loop a flag is
  2233. tested at the end of each repetition of the loop. If the flag is TRUE, the
  2234. loop terminates. Otherwise the loop repeats. Since the test is made at the
  2235. end of the loop, the loop will always be executed at least once.
  2236.  
  2237. Note:
  2238. Can only be used inside a word definition.
  2239.  
  2240. EXAMPLE
  2241.  
  2242.      ( scan through a list terminated by zero )
  2243.      : ListScan
  2244.       BEGIN
  2245.         DUP
  2246.         DUP
  2247.           = IF
  2248.             .H
  2249.         ENDIF
  2250.       NOT UNTIL
  2251.      ;
  2252.  
  2253. SEE ALSO
  2254.  
  2255.      BEGIN
  2256.  
  2257. WORD
  2258.  
  2259.      VARIABLE
  2260.  
  2261. TEMPLATE
  2262.  
  2263.      VARIABLE name
  2264.  
  2265. DESCRIPTION
  2266.  
  2267. Defines a named integer variable. The name of the variable must follow the
  2268. word VARIABLE. RPL interpreter allocates memory from the Vocabulary Stack
  2269. for storing the variable. The variable is initialized as 0.
  2270.  
  2271. When the variable is later referenced by entering it's name, the address
  2272. of the memory location that stores the variable's value is pushed onto the
  2273. stack.
  2274.  
  2275. Note:
  2276. This word is usually used outside word definitions.
  2277.  
  2278. SEE ALSO
  2279.  
  2280.      ! @ CONSTANT FVARIABLE FCONSTANT
  2281.  
  2282. WORD
  2283.  
  2284.      VLIST
  2285.  
  2286. TEMPLATE
  2287.  
  2288.      VLIST
  2289.  
  2290. DESCRIPTION
  2291.  
  2292. Lists the names of all words on Vocabulary Stack.
  2293.  
  2294. WORD
  2295.  
  2296.      W!
  2297.  
  2298. TEMPLATE
  2299.  
  2300.      w aWord W!
  2301.  
  2302.                             - REFERENCE 3.30 -
  2303.  
  2304. DESCRIPTION
  2305.  
  2306. Stores a value in an short integer variable. Takes the address of the
  2307. variable and the value to be stored off the stack.
  2308.  
  2309. This word can be used for accessing 16 bit integer fields, such as found
  2310. from Real 3D's material and object data structures.
  2311.  
  2312. Note:
  2313. There are no word variables in RPL. This word is needed only when
  2314. accessing 16 bit data from external data structures.
  2315.  
  2316. SEE ALSO
  2317.  
  2318.      W@ B@ B!
  2319.  
  2320. WORD
  2321.  
  2322.      W@
  2323.  
  2324. TEMPLATE
  2325.  
  2326.      aWord W@ i
  2327.  
  2328. DESCRIPTION
  2329.  
  2330. Fetches the value of a short integer. The address of the integer must be
  2331. on the stack top before calling this word.
  2332.  
  2333. Note:
  2334. See Note: for W!.
  2335.  
  2336. SEE ALSO
  2337.  
  2338.      W!B@B!
  2339.  
  2340. WORD
  2341.  
  2342.      WHILE
  2343.  
  2344. TEMPLATE
  2345.  
  2346.      WHILE
  2347.  
  2348. DESCRIPTION
  2349.  
  2350. In a BEGIN..WHILE..REPEAT loop a flag is tested at the WHILE word. If the
  2351. flag is TRUE, the words between WHILE and REPEAT are executed and the loop
  2352. starts over. If the flag is FALSE, then execution skips to the word that
  2353. comes after REPEAT.
  2354.  
  2355. Note:
  2356. Can only be used inside a word definition.
  2357.  
  2358. EXAMPLE
  2359.  
  2360.      : TILL_TEN ( i TIL_TEN )
  2361.       BEGiN
  2362.         DUP 1 +
  2363.       10 <= WHILE
  2364.         .
  2365.       REPEAT
  2366.       DROP
  2367.      ;
  2368.  
  2369. SEE ALSO
  2370.  
  2371.      BEGIN REPEAT
  2372.  
  2373. WORD
  2374.  
  2375.      XOR
  2376.  
  2377. TEMPLATE
  2378.  
  2379.      I2 I1 XOR I
  2380.  
  2381.                             - REFERENCE 3.31 -
  2382.  
  2383. DESCRIPTION
  2384.  
  2385. Takes two boolean flags off the stack and, if one and only one of them is
  2386. TRUE, puts TRUE on the stack, otherwise puts FALSE on the stack.
  2387.  
  2388. SEE ALSO
  2389.  
  2390.      IF AND OR
  2391.  
  2392. 3.2 OBJECT CREATION WORDS
  2393.  
  2394. The following words allow all the REAL 3D objects to be created using RPL.
  2395. These creation words can be recognized easily from the prefix "C_". The
  2396. general syntax for all the creation words is the following:
  2397.  
  2398. Geometry Color Attributes Tags C_XXXXX Address
  2399.  
  2400. RPL constants required by these words are defined in the file
  2401. "creation.rpl".
  2402.  
  2403. The object data structure must be exclusively locked before using any of
  2404. these words.
  2405.  
  2406. 3.2.1 Geometry
  2407.  
  2408. The structure of this section depends on the object in question and some
  2409. objects like "links" and "levels" don't have this section at all. The
  2410. purpose of this section is to describe the geometry for the object to be
  2411. created. Although the structure is this section is different for all
  2412. objects, they include some common data.
  2413.  
  2414. 3.2.1.1 fStAngle & fEnAngle
  2415.  
  2416. These parameters describe the angle of the sector in terms of the object
  2417. space of the primitive starting from fStAngle around anti-clockwise to
  2418. fEnAngle. These two floating-point operands are optional. If a sector
  2419. primitive is required then bit 12 of iAttr must be set and these two
  2420. operands must be supplied.
  2421.  
  2422. Only the following quadric primitives can be sectored:
  2423.  
  2424.      cone
  2425.      cut-cone
  2426.      cylinder
  2427.      ellipse
  2428.      ellipse-segment
  2429.      hyperboloid
  2430.  
  2431. 3.2.1.2 wGeomFlags
  2432.  
  2433. This parameter describes additional geometry information for freeforms.
  2434.  
  2435. wGF_CLOSEU - u dimension periodic: 0 - open, 1 - closed
  2436.  
  2437. wGF_CLOSEV - v dimension periodic: 0 - open, 1 - closed
  2438.  
  2439. wGF_SECTOR - set if sector primitive
  2440.  
  2441. wGF_PERIODIC - open/closed evaluation for animations
  2442.  
  2443. wGF_CLOSEU and wGF_CLOSEV flags can be used for closing freeform objects.
  2444. If the flag is set, the curve/surface is closed in corresponding
  2445. direction.
  2446.  
  2447. Note:
  2448. That curves are only sensitive to the flag wGF_CLOSEU.
  2449.  
  2450.                             - REFERENCE 3.32 -
  2451.  
  2452. The wGF_SECTOR flag is set whenever the object is sector primitive. This
  2453. flag tells to the evaluation system whether or not to treat the primitive
  2454. as a sector.
  2455.  
  2456. If the flag wGF_PERIODIC is set, closed curves are evaluated so that their
  2457. end point is the same as their beginning point. In order to use closed
  2458. loops for generating continous motions for loop-animations, set this flag.
  2459.  
  2460. 3.2.1.3 wFreeType
  2461.  
  2462. This specifies how the point data of a freeform is evaluated:
  2463.  
  2464. wFT_POLYGON - polygonal line or surface
  2465.  
  2466. wFT_PHONG - phong shaded surface (treated as polygonal for lines)
  2467.  
  2468. wFT_BSPLINE - Cubic B-Spline curve/surface
  2469.  
  2470. All other types are RESERVED.
  2471.  
  2472. These freeform types correspond the radio-button gadgets in the Modify/
  2473. Freeform/Type requester.
  2474.  
  2475. 3.2.2 iColor
  2476.  
  2477. This section consists of four integer values defining a color for the
  2478. object to be created. Whether or not this section should exists, depends
  2479. on the object in question. The RPL format of this section is the
  2480. following:
  2481.  
  2482. bR bG bB bA ( Red Green Blue Alpha )
  2483.  
  2484. 3.2.3 Attributes
  2485.  
  2486. This section is required by all creation words. The attributes data
  2487. section consists of two different parameters:
  2488.  
  2489. 3.2.3.1 Name
  2490.  
  2491. The name of the object to be created can be up to 16 characters long. If
  2492. a longer string is supplied, it will be truncated.
  2493.  
  2494. 3.2.3.2 Object Flags
  2495.  
  2496. The flags field is an integer value containing "yes/no" (on/off) kind of
  2497. information for the object to be created. The bits in this parameter
  2498. correspond the gadgets in the requester Modify/Properties/Attributes.
  2499.  
  2500. Flag Description
  2501.  
  2502. IOF_INVERTED Volume inverted in Boolean Operations
  2503. IOF_PAINTED Surface properties affects in Booleans
  2504. IOF_WFINVISIBLE Wire frame is invisible
  2505. IOF_LIGHTSOURCE Object is a light source
  2506. IOF_HOLLOW Represented as a surface instead of solid object
  2507. IOF_INFINITE Infinite object
  2508. IOF_SCENE Invisible in primary ray tracing
  2509. IOF_RTINVISIBLE Ray tracing invisible
  2510. IOF_NOBP1 No 1 st. bounding plane
  2511. IOF_NOBP2 No 2nd bounding plane
  2512. IOF_TEXTURE Primitive used for mapping textures to Absolute Space
  2513. IOF SECTOR Sector Primitive
  2514. IOF_PROTECTED Primitive cannot be modified
  2515. IOF_SEGMENT Segment instead of sector
  2516. IOF_NOTREFL Not reflected
  2517. IOF_MOTION Motion Blurred object
  2518. IOF_SHAdOWLESS Does not Cast Shadows
  2519. IOF_MATTE Matte Object
  2520.  
  2521.                             - REFERENCE 3.33 -
  2522.  
  2523. These bits correspond the toggle gadgets on the Attributes requester.
  2524. However, there are additional properties which can be controlled from RPL.
  2525. These are listed below:
  2526.  
  2527. IOF_SECTOR
  2528.  
  2529. The sector angle which is a part of the geometry definition of all quadric
  2530. primitives is enabled, and the object cross-section becomes a sector of an
  2531. ellipse.
  2532.  
  2533. IOF_SEGMENT
  2534.  
  2535. The Sector Angle is used to define the chord of an ellipse and the object
  2536. cross-section of the quadric primitive becomes a segment.
  2537.  
  2538. Any RESERVED bits must be left as zero for future compatibility.
  2539.  
  2540. 3.2.4 Tags
  2541.  
  2542. The tags section consists of a list of pairs of tag values and tag ID's
  2543. in that order. The list must terminate with "CEND", which because of the
  2544. RPN nature of the RPL language must be entered first.
  2545.  
  2546. For example, possible materials and methods associated with objects are
  2547. described using tags.
  2548.  
  2549. The method can be associated with the object by using the SMTH tag whose
  2550. value is any method name. This can either be a user-defined method or one
  2551. of the built-in methods. If no SMTH tag is present then NONE is used as
  2552. default.
  2553.  
  2554. Built in method names:
  2555.  
  2556.      NONE
  2557.      PATH
  2558.      ROTATION
  2559.      SWEEP
  2560.      SIZE
  2561.      STRETCH
  2562.      DIRECTION
  2563.      MOVE & DIR
  2564.      TRIM CURVES
  2565.      SIMPLE SKELETON
  2566.      SKELETON
  2567.      INV KINEMATIC
  2568.      MORPHING OPEN
  2569.      MORPHING CLOSED
  2570.      TRANSFORM
  2571.      WAVE
  2572.      RADIAL FORCE
  2573.      DIRECTED FORCE
  2574.      TANGENT FORCE
  2575.      COLLISION
  2576.      INT COLLISION
  2577.      FRICTION
  2578.      CREATION
  2579.      RPL
  2580.  
  2581. Materials can be associated with objects using the tag SMAT with the
  2582. material name.
  2583.  
  2584. For example, "wood1" "SMAT".
  2585.  
  2586. 3.2.5 Return Value
  2587.  
  2588. All the creation words return the address of the primitive created. If an
  2589. illegal geometry is defined then RPL will terminate execution and raise an
  2590. error.
  2591.  
  2592.                             - REFERENCE 3.34 -
  2593.  
  2594. 3.2.6 Word Definitions
  2595.  
  2596. WORD
  2597.  
  2598.      C_AIMPOINT
  2599.  
  2600. TEMPLATE
  2601.  
  2602.      VPosition
  2603.      bR bG bB bA
  2604.      sName
  2605.      iAttr
  2606.      TagList
  2607.      C_AIMPOINT aObject
  2608.  
  2609. WORD
  2610.  
  2611.      C_ATTRIB
  2612.  
  2613. TEMPLATE
  2614.  
  2615.      iR, iG, iB, iA
  2616.      sName
  2617.      iAttr
  2618.      TagList
  2619.      C_ATTRIB aObject
  2620.  
  2621. EXAMPLE
  2622.  
  2623.      ( create a texture with mapping type "Default" )
  2624.      255 255 255 0 ( RGBA )
  2625.      "wood_texture" ( Name )
  2626.      IOF_TEXTURE ( Attrib )
  2627.      "CEND" ( Tags )
  2628.      "wood" "SMAT"
  2629.      C_ATTRIB DROP
  2630.  
  2631. WORD
  2632.  
  2633.      C_CONE
  2634.  
  2635. TEMPLATE
  2636.  
  2637.      Vapex
  2638.      Va
  2639.      Vb
  2640.      Vaxis
  2641.      Vp
  2642.      Vm
  2643.      Vn
  2644.      [fStAngle fEnAngle]
  2645.      iR iB iG iA
  2646.      sName
  2647.      iAttr
  2648.      TagList
  2649.      C_CONE aObject
  2650.  
  2651. EXAMPLE
  2652.  
  2653. ( surface )
  2654. 1.50  1.50  2.00 (center)
  2655. 0.50  0.00  0.00 ( a )
  2656. 0.00  0.50  0.00 ( b )
  2657. 0.00  0.00  -1.00 ( c )
  2658. ( bounding plane )
  2659. 1.50  1.50  1.00 ( p )
  2660. 0.00  0.50  0.00 ( m )
  2661. 0.50  0.00  0.00 ( n )
  2662. 255 255 255 0  ( RGBA )
  2663. "cone"         ( name )
  2664. 0              ( attr )
  2665. "CEND"         ( tags )
  2666. C_CONE DROP
  2667.  
  2668. WORD
  2669.  
  2670.      C_COORDSYS
  2671.  
  2672. TEMPLATE
  2673.  
  2674.      Vorigin
  2675.      Vx
  2676.      Vy
  2677.      Vz
  2678.      bR bG bB bA
  2679.      sName
  2680.      iAttr
  2681.      TagList
  2682.      C_COORDSYS aObject
  2683.  
  2684.                             - REFERENCE 3.35 -
  2685.  
  2686. WORD
  2687.  
  2688.      C_CUBE
  2689.  
  2690. TEMPLATE
  2691.  
  2692.      Vvertex0
  2693.      Vvertex1
  2694.      Vvertex2
  2695.      Vdvect
  2696.      bR bG bB bA
  2697.      sName
  2698.      iAttr
  2699.      TagList
  2700.      C_CUBE aObject
  2701.  
  2702. EXAMPLE
  2703.  
  2704. ( create a cube animated by )
  2705. ( a RPL method MethodWord )
  2706. 2.00  3.01  0.00 ( first vertex )
  2707. 3.01  3.01  0.00 ( second vertex )
  2708. 2.00  2.00  0.00 ( third vertex )
  2709. 0.00  0.00  1.00 ( dvect )
  2710. 255 255 255 0  ( RGBA )
  2711. "cube"         ( name )
  2712. 0              ( attr )
  2713. "CEND"
  2714. "RPL" "SMTH"
  2715. "MethodWord" "SRPL"
  2716.      ( See MTH_CREATE example )
  2717. C_CUBE DROP
  2718.  
  2719. WORD
  2720.  
  2721.      C_CUTCONE
  2722.  
  2723. TEMPLATE
  2724.  
  2725.      Vcentre
  2726.      Va
  2727.      Vb
  2728.      Vaxis
  2729.      Vp1
  2730.      Vm1
  2731.      Vn1
  2732.      Vp2
  2733.      Vm2
  2734.      Vn2
  2735.      [fStAngle fEnAngle]
  2736.      iR iB iG iA
  2737.      sName
  2738.      iAttr
  2739.      TagList
  2740.      C_CUTCONE aObject
  2741.  
  2742. EXAMPLE
  2743.  
  2744. ( create a sectored cut-cone )
  2745. ( surface )
  2746. -2.51  -0.50  2.50  (center)
  2747. 0.50   0.00   0.00  ( a )
  2748. 0.00   0.50   0.00  ( b )
  2749. 0.00   0.00   -1.50 ( axis )
  2750. ( first bounding plane )
  2751. -2.51  -0.50  1.00  ( p1 )
  2752. 0.001   1.00  0.00  ( m1 )
  2753. 1.00    0.00  0.00  ( n1 )
  2754. ( second bounding plane )
  2755. -2.51  -0.50  2.00  ( p2 )
  2756. 0.00    1.00  0.00  ( m2 )
  2757. 1.00    0.00  0.00  ( n2 )
  2758. 0.00    4.71    ( angles )
  2759. 255 255 255 0   ( RGBA )
  2760. "cutcone"       ( name )
  2761. IOF_SECTOR      ( attr: sector )
  2762. "CEND"
  2763. C_CUTCONE DROP
  2764.  
  2765. WORD
  2766.  
  2767. C_CUTPOLYMID
  2768.  
  2769. TEMPLATE
  2770.  
  2771.      Vvertex0
  2772.      Vvertex1
  2773.      Vvertex2
  2774.      Vvertex3
  2775.      Vvertex4
  2776.      Vvertex5
  2777.      [Vvertexn ..]
  2778.      iCount
  2779.      bR bG bB bA
  2780.      sName
  2781.      iAttr
  2782.      TagList
  2783.      C_CUTPOLYMID aObject
  2784.  
  2785.                             - REFERENCE 3.36 -
  2786.  
  2787. Note:
  2788.  
  2789. iCount specifies the number of vertices on each polygonal face of the
  2790. polymid, NOT the total number of vertices. There must be an equal number
  2791. of vertices for both faces, or the geometry is illegal.
  2792.  
  2793. WORD
  2794.  
  2795.      C_CUTPYRAMID
  2796.  
  2797. TEMPLATE
  2798.  
  2799.      Vvertex0
  2800.      Vvertex1
  2801.      Vvertex2
  2802.      Vvertex3
  2803.      Vvertex4
  2804.      Vvertex5
  2805.      bR bG bB bA
  2806.      sName
  2807.      iAttr
  2808.      TagList
  2809.      C_CUTPYRAMID aObject
  2810.  
  2811. WORD
  2812.  
  2813.      C_CYLINDER
  2814.  
  2815. TEMPLATE
  2816.  
  2817.      Vcentre
  2818.      Va
  2819.      Vb
  2820.      Vaxis
  2821.      Vp1
  2822.      Vm1
  2823.      Vn1
  2824.      Vp2
  2825.      Vm2
  2826.      Vn2
  2827.      [fStAngle fEnAngle]
  2828.      iR iB iG iA
  2829.      sName
  2830.      iAttr
  2831.      TagList
  2832.      C_CYLINDER aObject
  2833.  
  2834. WORD
  2835.  
  2836.      C_ELLIPSE
  2837.  
  2838. TEMPLATE
  2839.  
  2840.      Vcentre
  2841.      Va
  2842.      Vb
  2843.      Vdvect
  2844.      [fStAngle fEnAngle]
  2845.      iR iB iG iA
  2846.      sName
  2847.      iAttr
  2848.      TagList
  2849.      C_ELLIPSE aObject
  2850.  
  2851. WORD
  2852.  
  2853.      C_ELLIPSEG
  2854.  
  2855. TEMPLATE
  2856.  
  2857.      Vcentre
  2858.      Va
  2859.      Vb
  2860.      Vaxis
  2861.      Vp1
  2862.      Vm1
  2863.      Vn1
  2864.      Vp2
  2865.      Vm2
  2866.      Vn2
  2867.      [fStAngle fEnAngle]
  2868.      iR iB iG iA
  2869.      sName
  2870.      iAttr
  2871.      TagList
  2872.      C_ELLIPSEG aObject
  2873.  
  2874.                             - REFERENCE 3.37 -
  2875.  
  2876. WORD
  2877.  
  2878.      C_ELLIPSOID
  2879.  
  2880. TEMPLATE
  2881.  
  2882.      Vcentre
  2883.      Va
  2884.      Vb
  2885.      Vaxis
  2886.      bR bG bB bA
  2887.      sName
  2888.      iAttr
  2889.      TagList
  2890.      C_ELLIPSOID aObject
  2891.  
  2892. WORD
  2893.  
  2894.      C_GROUP
  2895.  
  2896. TEMPLATE
  2897.  
  2898.      iIndx0 [iIndxn ..]
  2899.      iCount
  2900.      bR bG bB bA
  2901.      sName
  2902.      iAttr
  2903.      TagList
  2904.      C_GROUP aObject
  2905.  
  2906. OPERANDS
  2907.  
  2908.      iIndxn - Indexes of the points of the freeform.
  2909.  
  2910. DESCRIPTION
  2911.  
  2912. Creates a sub-group primitive referring to the points of a freeform. One
  2913. tag in must be SOBJ and its value must contain the path and name of the
  2914. freeform.
  2915.  
  2916. EXAMPLE
  2917.  
  2918. 0.0  0.0  0.0
  2919. 0.0  0.1  0.0
  2920. 1.0  1.0  0.2
  2921. 3              ( count )
  2922. 3              ( type )
  2923. 0              ( geometry flags )
  2924. 255 255 255 0  ( RGBA )
  2925. "line"         ( name )
  2926. IOF_RTINVISIBLE  ( attr: )
  2927. "CEND"         ( tags )
  2928. C_LINE DROP
  2929.  
  2930.                ( point references )
  2931. 0 2
  2932. 2              ( count )
  2933. 255 255 255 0  ( RGBA )
  2934. "line_group"   ( name )
  2935. 0              ( attr: )
  2936. "CEND"         ( tags )
  2937. "/Root/line" "SOBJ"
  2938. C_GROUP DROP
  2939.  
  2940. SEE ALSO
  2941.  
  2942.      C_LINE C_MESH
  2943.  
  2944. WORD
  2945.  
  2946.      C_HYPERBOL
  2947.  
  2948. TEMPLATE
  2949.  
  2950.      Vcentre
  2951.      Va
  2952.      Vb
  2953.      Vaxis
  2954.      Vp1
  2955.      Vm1
  2956.      Vn1
  2957.      Vp2
  2958.      Vm2
  2959.      Vn2
  2960.      [fStAngle fEnAngle]
  2961.      iRiBiGiA
  2962.      sName
  2963.      iAttr
  2964.      TagList
  2965.      C_HYPERBOL aObject
  2966.  
  2967.                             - REFERENCE 3.38 -
  2968.  
  2969. WORD
  2970.  
  2971.      C_LEVEL
  2972.  
  2973. TEMPLATE
  2974.  
  2975.      wBoolean
  2976.      sName
  2977.      iAttr
  2978.      TagList
  2979.      C_LEVEL aObject
  2980.  
  2981. DESCRIPTION
  2982.  
  2983. Creates a level with the attributes and tags supplied. The Boolean
  2984. Operator type is specified by wBoolean as follows:
  2985.  
  2986.      wOT_AND
  2987.      wOT_OR
  2988.  
  2989. Note:
  2990. The level does not become the Current Level.
  2991.  
  2992. EXAMPLE
  2993.  
  2994.      wOT_OR "mylevel" 0 "CEND" C_LEVEL DROP
  2995.  
  2996. SEE ALSO:
  2997.  
  2998.      O_CURRENT
  2999.  
  3000. WORD
  3001.  
  3002.      C_LINE
  3003.  
  3004. TEMPLATE
  3005.  
  3006.      Vpt0
  3007.      Vpt1
  3008.      [Vptn ..]
  3009.      iCount
  3010.      wFreeType
  3011.      wGeomFIags
  3012.      bR bG bB bA
  3013.      sName
  3014.      iAttr
  3015.      TagList
  3016.      C_LINE aObject
  3017.  
  3018. EXAMPLE
  3019.  
  3020. ( points )
  3021. 1.00  -1.00  0.00
  3022. 2.00  -1.00  0.00
  3023. 2.00  -2.00  0.00
  3024. 1.00  -2.00  0.00
  3025. 4               ( count )
  3026. 3               ( type )
  3027. wGF CLOSEU      ( geom. flags )
  3028. 255255 255 0    ( RGBA )
  3029. "mycurve"       ( name )
  3030. 0               ( flags )
  3031. "CEND"
  3032. C_LINE DROP
  3033.  
  3034. Note:
  3035. For B-spline lines there must be a minimum of four points.
  3036.  
  3037. WORD
  3038.  
  3039.      C_LINK
  3040.  
  3041. TEMPLATE
  3042.  
  3043.      sName
  3044.      iAttr
  3045.      TagList
  3046.      C_LINK aObject
  3047.  
  3048. DESCRIPTION
  3049.  
  3050. Create a symbolic link. One of the tags must be "SOBJ" and its value is
  3051. the path and name for the object the link refers to.
  3052.  
  3053. EXAMPLE
  3054.  
  3055.      "link" 0 "CEND" "/Root/rectangle"
  3056.      "SOBJ" C_ LINK
  3057.  
  3058.                             - REFERENCE 3.39 -
  3059.  
  3060. WORD
  3061.  
  3062.      C_MESH
  3063.  
  3064. TEMPLATE
  3065.  
  3066.      Vpt[0,0] 
  3067.      Vpt[0,1]
  3068.      [Vpt[u,v] ..]
  3069.      Vpt[1,0]
  3070.      Vpt[1,1]
  3071.      [Vpt[u,v] ..]
  3072.      iU
  3073.      iV
  3074.      wFreeType
  3075.      wGeomFIags
  3076.      bR bG bB bA
  3077.      sName
  3078.      iAttr
  3079.      TagList
  3080.      C_MESH aObject
  3081.  
  3082. OPERANDS
  3083.  
  3084. iU, iV -  number of points for each dimension of the mesh.
  3085.  
  3086. Note:
  3087. For a B-spline mesh there must be at least four points for each dimension.
  3088. The total number of points for the mesh must be the product of iU and iV.
  3089.  
  3090. EXAMPLE
  3091.  
  3092. ( line 0 )
  3093.  
  3094. -0.50  0.50  0.00
  3095. -0.17  0.50  0.00
  3096. 0.17   0.50  0.00
  3097. 0.50   0.50  0.00
  3098.  
  3099. ( line 1 )
  3100. -0.50  0.17  0.00
  3101. -0.17  0.17  0.00
  3102. 0.17   0.17  0.00
  3103. 0.50   0.17  0.00
  3104.  
  3105. ( line 2 ) 
  3106. -0.50 -0.17  0.00
  3107. -0.17 -0.17  0.00
  3108. 0.17  -0.17  0.00
  3109. 0.50  -0.17  0.00
  3110.  
  3111. ( line 3 )
  3112. -0.50 -0.50  0.00
  3113. -0.17 -0.50  0.00
  3114. 0.17  -0.50  0.00
  3115. 0.50  -0.50  0.00
  3116. 4       ( width )
  3117. 4       ( height )
  3118. 3       ( type )
  3119. 0       ( geom. flags )
  3120. 255 255 255 0 ( RGBA )
  3121. "mesh"        ( name )
  3122. 0             ( attr: )
  3123. "CEND"
  3124. C_MESH DROP
  3125.  
  3126. WORD
  3127.  
  3128.      C_OFFSET
  3129.  
  3130. TEMPLATE
  3131.  
  3132.      Vposition
  3133.      bR bG bB bA
  3134.      sName
  3135.      iAttr
  3136.      TagList
  3137.      C_OFFSET aObject
  3138.  
  3139. EXAMPLE
  3140.  
  3141. ( create blue light-point that doesn't cast shadows )
  3142. 0.0  0.0  0.0 ( position )
  3143. 35 35 255 0   ( RGBA )
  3144. "BlueLight"   ( name )
  3145. IOF_LIGHTSOURCE IOF_SHADOWLESS BOR
  3146. "CEND"
  3147. C_OFFSET DROP
  3148.  
  3149.                             - REFERENCE 3.40 -
  3150.  
  3151. WORD
  3152.  
  3153.      C_POLYGON
  3154.  
  3155. TEMPLATE
  3156.  
  3157.      Vvertex0
  3158.      Vvertex1
  3159.      Vvertex2
  3160.      [Vpt..]
  3161.      Vdvect
  3162.      iCount
  3163.      bR bG bB bA
  3164.      sName
  3165.      iAttr
  3166.      TagList
  3167.      C_POLYGON aObject
  3168.  
  3169. WORD
  3170.  
  3171.      C_POLYHEDRON
  3172.  
  3173. TEMPLATE
  3174.  
  3175.      Vvertex0
  3176.      Vvertex1
  3177.      Vvertex2
  3178.      [Vvertexn ..]
  3179.      Vdvect
  3180.      iCount
  3181.      bR bG bB bA
  3182.      sName
  3183.      iAttr
  3184.      TagList
  3185.      C_POLYHEDRON aObject
  3186.  
  3187. WORD
  3188.  
  3189.      C_POLYMID
  3190.  
  3191. TEMPLATE
  3192.  
  3193.      Vvertex0
  3194.      Vvertex1
  3195.      Vvertex2
  3196.      [Vvertexn ..]
  3197.      Vapex
  3198.      iCount
  3199.      bR bG bB bA
  3200.      sName
  3201.      iAttr
  3202.      TagList
  3203.      C_POLYMI D aObject
  3204.  
  3205. WORD
  3206.  
  3207.      C_PYRAMID
  3208.  
  3209. TEMPLATE
  3210.  
  3211.      Vvertex0
  3212.      Vvertex1
  3213.      Vvertex2
  3214.      Vapex
  3215.      bR bG bB bA
  3216.      sName
  3217.      iAttr
  3218.      TagList
  3219.      C_PYRAMID aObject
  3220.  
  3221. WORD
  3222.  
  3223.      C_RECTANGLE
  3224.  
  3225. TEMPLATE
  3226.  
  3227.      Vvertex0
  3228.      Vvertex1
  3229.      Vvertex2
  3230.      Vdvect
  3231.      bR bG bB bA
  3232.      sName
  3233.      iAttr
  3234.      TagList
  3235.      C_RECTANGLE aObject
  3236.  
  3237.                             - REFERENCE 3.41 -
  3238.  
  3239. WORD
  3240.  
  3241.      C_TRISET
  3242.  
  3243. TEMPLATE
  3244.  
  3245.      Vpt0
  3246.      Vpt1
  3247.      Vpt2
  3248.      [Vptn ..]
  3249.      iCount
  3250.      iIndx0 iIndx1 iIndx2
  3251.      [iIndxn iIndxo iIndxp ..]
  3252.      iF aceCount
  3253.      wFreeType
  3254.      bR bG bB bA
  3255.      sName
  3256.      iAttr
  3257.      TagList
  3258.      C_TRISET aObject
  3259.  
  3260. OPERANDS
  3261.  
  3262. iIndxn     - Indexes of the points forming the faces
  3263. iFaceCount - Number of index triplets
  3264.  
  3265. DESCRIPTION
  3266.  
  3267. This word is used internally for creating a mesh with a triangular face
  3268. topology. There are no menu functions for this.
  3269.  
  3270. It is possible to create RPL programs to convert the data structures of
  3271. other 3D graphics programs that use triangular mesh topologies into REAL
  3272. 3D meshes using this word.
  3273.  
  3274. Note:
  3275. wFreeType must specify either polygonal or phong type
  3276.  
  3277. WORD
  3278.  
  3279.      C_VIEWPOINT
  3280.  
  3281. TEMPLATE
  3282.  
  3283.      Vleft
  3284.      Vright
  3285.      Vdvect
  3286.      bR bG bB bA
  3287.      sName
  3288.      iAttr
  3289.      TagList
  3290.      C_VIEWPOINT aObject
  3291.  
  3292. OPERANDS
  3293.  
  3294.      Vleft  - position of left view for stereo vision pair
  3295.      Vright - right view
  3296.      Vdvect - direction of stereo vision pair
  3297.  
  3298. DESCRIPTION
  3299.  
  3300. Create a viewpoint consisting of a stereo vision pair.
  3301.  
  3302. 3.3 MODIFICATION WORDS
  3303.  
  3304. RPL constants for these words can be found from the file "modify.rpl".
  3305.  
  3306. This set of words in the RPL vocabulary allow object properties to be
  3307. modified. Their target objects are specified by one or more addresses on
  3308. the stack. This list is terminated with NULL.
  3309.  
  3310. Each word requires additional information to carry out its function. This
  3311. information is specified with a common integer operand, whose bits are
  3312. defined as follows:
  3313.  
  3314.                             - REFERENCE 3.42 -
  3315. 3.3.1 Modify Flags
  3316.  
  3317. FLAG DESCRIPTION
  3318.  
  3319. IMF_ROTEXT      Rotate & Extend if set
  3320.  
  3321. IMF_NOSUB       0 - Modify sub-objects,
  3322.                 1 - Only modify targets
  3323.  
  3324. IMF_NOCOG       About COGs if set
  3325.  
  3326. IMF_COGONLY     With COGs if set
  3327.  
  3328. IMF_BNDSIZE     0 -
  3329.  
  3330. M_BEND          Move, 1 -
  3331.  
  3332. M_BEND          Size
  3333.  
  3334. IMF_PARABOL
  3335.  
  3336. IMF_LINEAR
  3337.  
  3338. IMF_SPHERE
  3339.  
  3340. IMF_CURVE
  3341.  
  3342. IMF_SIN
  3343.  
  3344. All other bits are RESERVED and should be left as zero by the user for
  3345. future compatibility.
  3346.  
  3347. 3.3.2 Locking Object Data
  3348.  
  3349. Before using any of the M words the data structure MUST be locked
  3350. EXCLUSIVELY or conflict with other tasks may cause the system to crash.
  3351.  
  3352. 3.3.3 Word Definitions
  3353.  
  3354. WORD
  3355.  
  3356.      M_ALPHA
  3357.  
  3358. TEMPLATE
  3359.  
  3360.      0 aObject1 [...aObject]
  3361.      iA
  3362.      iFlags
  3363.      M_ALPHA
  3364.  
  3365. OPERANDS
  3366.  
  3367.      iA - New alpha channel value for objects.
  3368.  
  3369. DESCRIPTION
  3370.  
  3371. Modifies so called "alpha channel" attribute of given objects. The value
  3372. of iA must be between 0 and 255.
  3373.  
  3374. EXAMPLE
  3375.  
  3376.      O_GETSEL ( objects )
  3377.      100 ( alpha )
  3378.      0
  3379.      M_ALPHA
  3380.  
  3381. WORD
  3382.  
  3383.      M_COLOR
  3384.  
  3385. TEMPLATE
  3386.  
  3387.      0 aObject1 [...aObject]
  3388.      iR iB iG iA
  3389.      iRegister
  3390.      iFlags
  3391.      M_COLOR
  3392.  
  3393. OPERANDS
  3394.  
  3395. iR iB iG iA - New color for objects
  3396. iRegister   - Register color for wire-frame
  3397.  
  3398.                             - REFERENCE 3.43 -
  3399.  
  3400. DESCRIPTION
  3401.  
  3402. Changes the color of given objects.
  3403.  
  3404. EXAMPLE
  3405.  
  3406.      0 "/Root/rectangle" O FIND ( objects )
  3407.      255 255 255 0 ( RGBA )
  3408.      2             ( register )
  3409.      0
  3410.      M_COLOR
  3411.  
  3412. WORD
  3413.  
  3414.      M_COPY
  3415.  
  3416. TEMPLATE
  3417.  
  3418.      0 aObject1 [aObjectn ..] M_COPY
  3419.  
  3420. DESCRIPTION
  3421.  
  3422. Copies the targets to the Clip Buffer.
  3423.  
  3424. EXAMPLE
  3425.  
  3426.      O_GETSEL ( objects )
  3427.      M_COPY
  3428.  
  3429. WORD
  3430.  
  3431.      M_CUT
  3432.  
  3433. TEMPLATE
  3434.  
  3435.      0 aObject1 [aObjectn ..] M_CUT
  3436.  
  3437. DESCRIPTION
  3438.  
  3439. Cuts targets from the hierarchy and places them in the Clip Buffer.
  3440.  
  3441. EXAMPLE
  3442.  
  3443.      O_GETSEL ( objects )
  3444.      M_CUT
  3445.  
  3446. WORD
  3447.  
  3448.      M_DELETE
  3449.  
  3450. TEMPLATE
  3451.  
  3452.      0 aObject1 [aObjectn ..] M_DELETE
  3453.  
  3454. DESCRIPTION
  3455.  
  3456. Deletes targets from hierarchy.
  3457.  
  3458. EXAMPLE
  3459.  
  3460.      O_GETSEL ( objects )
  3461.      M_DELETE
  3462.  
  3463. WORD
  3464.  
  3465.      M_DUPLICATE
  3466.  
  3467. TEMPLATE
  3468.  
  3469.      0 aObject1 [aObjectn ..]
  3470.      aLevel
  3471.      iFlags
  3472.      M_DUPLICATE
  3473.  
  3474. DESCRIPTION
  3475.  
  3476. Duplicates given objects and inserts them in to the given object aLevel.
  3477.  
  3478. EXAMPLE
  3479.  
  3480. O_GETSEL  ( objects )
  3481. O_GETCURR ( to )
  3482. 0         ( flags )
  3483. M_DUPLICATE
  3484.  
  3485.                             - REFERENCE 3.44 -
  3486.  
  3487. WORD
  3488.  
  3489.      M_EXTEND
  3490.  
  3491. TEMPLATE
  3492.  
  3493.      0
  3494.      aObject1
  3495.      [aObjectn ..]
  3496.      vCentre
  3497.      vDirect
  3498.      fCoeff
  3499.      iFlIags
  3500.      M_EXTEND
  3501.  
  3502. DESCRIPTION
  3503.  
  3504. The targets are extended about Vcentre along the direction specified by
  3505. Vdirect by the amount specified by fCoeff.
  3506.  
  3507. EXAMPLE
  3508.  
  3509.      O_GETSEL      ( objects )
  3510.      0.21  0.22  0 ( center )
  3511.      0.97 -0.25  0 ( direction )
  3512.     -0.6           ( coefficient )
  3513.      0             ( flags )
  3514.      M_EXTEND
  3515.  
  3516. WORD
  3517.  
  3518.      M_MIRROR
  3519.  
  3520. TEMPLATE
  3521.  
  3522.      0 aObject1 [...aObjectn]
  3523.      vCentre
  3524.      iFlags
  3525.      M_MIRROR
  3526.  
  3527. DESCRIPTION
  3528.  
  3529. The targets are mirrored about a plane that passes through Vcentre, and in
  3530. the direction specified by Vdirect.
  3531.  
  3532. EXAMPLE
  3533.  
  3534.      O_GETSEL       ( objects )
  3535.      -0.03  0.78  0 ( center )
  3536.      -0.58  -0.81 0 ( axis )
  3537.      0 ( flags )
  3538.      M_MIRROR
  3539.  
  3540. WORD
  3541.  
  3542.      M_MOVE
  3543.  
  3544. TEMPLATE
  3545.  
  3546.      0 aObject1 [...aObjectn]
  3547.      Vdelta
  3548.      iFlags
  3549.      M_MOVE
  3550.  
  3551. OPERANDS
  3552.  
  3553. Vdelta - vector defining direction and amount to move targets.
  3554.  
  3555. EXAMPLE
  3556.  
  3557.      O_GETSEL    ( objects )
  3558.      0.2 0.2 2 0 ( delta )
  3559.      0           ( flags )
  3560.      M_MOVE
  3561.  
  3562. WORD
  3563.  
  3564.      M_MOVECOG
  3565.  
  3566. TEMPLATE
  3567.  
  3568.      0 aObject1 [...aObjectn]
  3569.      vPosition
  3570.      iFlags
  3571.      M_MOVECOG
  3572.  
  3573. OPERANDS
  3574.  
  3575. vPosition - new position for targets' COGs.
  3576.  
  3577.                             - REFERENCE 3.45 -
  3578.  
  3579. EXAMPLE
  3580.  
  3581.      O_GETSEL     ( objects )
  3582.      -0.23 0.52 0 ( position )
  3583.      0            ( flags )
  3584.      M_MOVECOG
  3585.  
  3586. WORD
  3587.  
  3588.      M_NAME
  3589.  
  3590. TEMPLATE
  3591.  
  3592.      0 aObject1 [...aObjectn]
  3593.      sName
  3594.      iFlags
  3595.      M_NAME
  3596.  
  3597. DESCRIPTION
  3598.  
  3599. Renames ALL targets to the name specified by sName.
  3600.  
  3601. EXAMPLE
  3602.  
  3603.      O_GETSEL   ( objects )
  3604.      "newname"  ( name )
  3605.      0          ( flags )
  3606.      M_NAME
  3607.  
  3608. WORD
  3609.  
  3610.      M_PASTE
  3611.  
  3612. TEMPLATE
  3613.  
  3614.      aLevel iFlags M_PASTE
  3615.  
  3616. DESCRIPTION
  3617.  
  3618. Pastes copies of the Clip Buffer into the object pointed by aLevel.
  3619.  
  3620. EXAMPLE
  3621.  
  3622. "/Root/rect*" O_FINDWLD M_CUT
  3623. "/Root/Level" O_FIND 0 M_PASTE
  3624.  
  3625. WORD
  3626.  
  3627.      M_ROTATE
  3628.  
  3629. TEMPLATE
  3630.  
  3631.      0 aObject1 [aObjectn...]
  3632.      vCenter
  3633.      vHor
  3634.      vVert
  3635.      vNorm
  3636.      iFlags
  3637.      M_ROTATE
  3638.  
  3639. DESCRIPTION
  3640.  
  3641. The targets are rotated and scaled to the coordinate system defined by
  3642. vCenter, vHor , vVert and vNorm parameters. If the lenghts of vHor, vNorm
  3643. and vVert vectors are 1, then the target objects are only rotated. For
  3644. example, if the length of the vector vHor is 2, the the size of the
  3645. objects is doubled in the d irection defined by vHor.
  3646.  
  3647. The syntax of this word reflects the functions Modify/Linear/Rotate,
  3648. Rot&Ext and Deform.
  3649.  
  3650. EXAMPLE
  3651.  
  3652.      O_GETSEL      ( objects )
  3653.      -0.32  0.4  0 ( center )
  3654.      0.83   0.56 0 ( hor )
  3655.      -0.56  0.83 0 ( vert )
  3656.      0      0    1 ( norm )
  3657.      0             ( flags )
  3658.      M_ROTATE
  3659.  
  3660.                             - REFERENCE 3.46 -
  3661.  
  3662. WORD
  3663.  
  3664.      M_SIZE2D
  3665.  
  3666. TEMPLATE
  3667.  
  3668.      0 aObject1 [aObjectn . .]
  3669.      vCenter
  3670.      vHor
  3671.      vVert
  3672.      fHCoeff fVCoef
  3673.      iFlags
  3674.      M_SIZE3D
  3675.  
  3676. DESCRIPTION
  3677.  
  3678. Changes the size of the targets in two dimensions about the center defined
  3679. by vCenter. The directions in which the object is stretched are defined by
  3680. the parameters vHor and vVert. This word reflects the internal
  3681. implementation of the Modify/Linear/Size 2D function.
  3682.  
  3683. EXAMPLE
  3684.  
  3685.      O_GETSEL       ( objects )
  3686.     -0.68  0.82  0 ( center )
  3687.      1     0     0 ( hor )
  3688.      0     1     0 ( vert )
  3689.      0.44  0.44    ( hf,vf )
  3690.      0             ( flags )
  3691.      M_SIZE2D
  3692.  
  3693. WORD
  3694.  
  3695.      M_SHEAR
  3696.  
  3697. TEMPLATE
  3698.  
  3699.      0 aObject1 [aObjectn...]
  3700.      vCenter
  3701.      vNorm
  3702.      vDir
  3703.      fCoeff
  3704.      iFlags
  3705.      M_SHEAR
  3706.  
  3707. DESCRIPTION
  3708.  
  3709. The targets are sheared in the direction defined by vDir parameter. The
  3710. longer the distance between a point and vCenter in the direction defined
  3711. by vNorm, the more it is moved along the vDir axis. The coefficient
  3712. defines how much the targets are sheared.
  3713.  
  3714. EXAMPLE
  3715.  
  3716.      O_GETSEL       ( objects )
  3717.      0.28  0.36   0 ( center )
  3718.     -0.92  -0.38  0 ( normal )
  3719.      0.38  -0.92  0 ( dir )
  3720.     -0.83           ( coeff )
  3721.      0              ( flags )
  3722.      M_SHEAR
  3723.  
  3724. WORD
  3725.  
  3726.      M_SIZE3D
  3727.  
  3728. TEMPLATE
  3729.  
  3730.      0
  3731.      aObject1
  3732.      [aObjectn ..]
  3733.      Vcentre
  3734.      fCoeff
  3735.      iFlags
  3736.      M_SIZE3D
  3737.  
  3738. DESCRIPTION
  3739.  
  3740. Alter the size of the targets about the centre specified by Vcentre in all
  3741. dimensions by the amount specified by fCoeff.
  3742.  
  3743. EXAMPLE
  3744.  
  3745.      O_GETSEL       ( objects )
  3746.      -0.67  0.78  0 ( center )
  3747.      1.4            ( coefficient )
  3748.      0              ( flags )
  3749.      M_SIZE3D
  3750.  
  3751.                             - REFERENCE 3.47 -
  3752.  
  3753. WORD
  3754.  
  3755.      M_STRETCH
  3756.  
  3757. TEMPLATE
  3758.  
  3759.      0
  3760.      aObject1
  3761.      [aObjectn ..]
  3762.      vCentre
  3763.      vHor
  3764.      vVert
  3765.      vNorm
  3766.      vCoeff
  3767.      iFlags
  3768.      M_STRETCH
  3769.  
  3770. DESCRIPTION
  3771.  
  3772. Stretches objects in three dimensions. How much the object is stretched
  3773. is defined independently in all three dimensions by the parameter vCoeff.
  3774. For example, if the value of vCoeff is 0 1 0, then the size of object is
  3775. doubled in the direction defined by vVert.
  3776.  
  3777. EXAMPLE
  3778.  
  3779.      O_GETSEL     ( objects )
  3780.      0     0.3  0 ( center )
  3781.      1     0    0 ( hor )
  3782.      0     1    0 ( vert )
  3783.      0     0    1 ( norm )
  3784.     -0.02 -0.23 0 ( coeff )
  3785.      0            ( flags )
  3786.      M_STRETCH
  3787.  
  3788. WORD
  3789.  
  3790.      M_SWAP
  3791.  
  3792. TEMPLATE
  3793.  
  3794.      iFlags
  3795.      M_SWAP
  3796.  
  3797. DESCRIPTION
  3798.  
  3799. Swaps the order of selected objects. This function corresponds the
  3800. function Modify/Structure/Swap.
  3801.  
  3802. EXAMPLE
  3803.  
  3804.      0 ( flags )
  3805.      M_SWAP
  3806.  
  3807. 3.4 OBJECT WORDS
  3808.  
  3809. These words are all for creating and manipulating object data structure
  3810. in the hierarchy.
  3811.  
  3812. 3.4.1 Return Value
  3813.  
  3814. Excluding O_EVAL, O_DERIV and O_SCAN, possible return values are always
  3815. addresses to the data structure the word relates to. If the word fails to
  3816. execute because the operands are invalid, then it returns NULL.
  3817.  
  3818. 3.4.2 Locking Data Structure
  3819.  
  3820. THE OBJECT DATA STRUCTURE MUST BE LOCKED BEFORE ANY OF THE O_words IS
  3821. USED. Failure to do so may cause RPL code to crash the system. Object data
  3822. structure should be unlocked as early as possible, because locking
  3823. prevents other tasks from accessing object data.
  3824.  
  3825. If the user's RPL code only reads data structures, then shared access can
  3826. be used. If the code modifies data (M_words, O_DELETE etc.), then
  3827. exclusive access MUST be used. See: O_LOCK.
  3828.  
  3829.                             - REFERENCE 3.48 -
  3830.  
  3831. 3.4.3 Word Definitions
  3832.  
  3833. WORD
  3834.  
  3835.      O_CREATAG - Create Object Tag
  3836.  
  3837. TEMPLATE
  3838.  
  3839.      aObject TagList O_CREATAG aTagAddr
  3840.  
  3841. DESCRIPTION
  3842.  
  3843. Creates and adds to the given object the given tags. The tags are defineds
  3844. as pairs of a Tag Value and a Tag ID, and the list must be terminated with
  3845. "CEND". The word returns the address of the last Tag ID created.
  3846.  
  3847. Note:
  3848. The address of the Tag Field is the address of the Tag ID + 4. If the tag
  3849. is an integer (lxxx) then the Tag Field is the Tag Value, otherwise it is
  3850. the address of the Tag Values.
  3851.  
  3852. EXAMPLE
  3853.  
  3854.      ( create vector tag to the object "/Root/myobj" )
  3855.      "/Root/myobj" O_FIND
  3856.      "CEND"
  3857.      12.0  5.0  0.0 "VMyT"
  3858.      O_CREATAG
  3859.      DROP
  3860.  
  3861. WORD
  3862.  
  3863.      O_CURRENT
  3864.  
  3865. TEMPLATE
  3866.  
  3867.      aObject O_CURRENT aPrevCurr
  3868.  
  3869. DESCRIPTION
  3870.  
  3871. This makes the object specified by aObject the current level. It returns
  3872. the address of the previous current level unless the object is a primitive
  3873. with no sub-structure ( e.g. an ellipsoid ). 
  3874.  
  3875. EXAMPLE
  3876.  
  3877.      "/Car/Engine" O_FIND O_CURRENT
  3878.  
  3879. WORD
  3880.  
  3881.      O_DELETE
  3882.  
  3883. TEMPLATE
  3884.  
  3885.      aObject O_DELETE
  3886.  
  3887. DESCRIPTION
  3888.  
  3889. deletes the object whose address is aObject.
  3890.  
  3891. Note:
  3892.  
  3893. That NULL is a valid address for O_DELETE, in which case the word does
  3894. nothing.
  3895.  
  3896. EXAMPLE
  3897.  
  3898.      "/Root/myobj" O_FIND O_DELETE
  3899.  
  3900. WORD
  3901.  
  3902.      O_DERIV
  3903.  
  3904. TEMPLATE
  3905.  
  3906.      aParam VPSpace O_DERIV Vdir
  3907.  
  3908.                             - REFERENCE 3.49 -
  3909.  
  3910. DESCRIPTION
  3911.  
  3912. This returns the three floating-point values of the direction evaluated
  3913. from the parameter aParam with the parameter values specified by VPSpace.
  3914.  
  3915. The vector components of VPSpace correspond the r, s and t dimensions.
  3916.  
  3917. Note:
  3918. The operand aParam must point to an evaluable object or an error will
  3919. follow.
  3920.  
  3921. EXAMPLE
  3922.  
  3923.      ( get the address of a valid parameter )
  3924.      "/Root/line" O_FIND
  3925.  
  3926.      ( specify the Parameter Space coordinates )
  3927.      0.5 0.0 0.0
  3928.      O_DERIV
  3929.      F.F.F ( print out the direction )
  3930.  
  3931. WORD
  3932.  
  3933.      O_EVAL
  3934.  
  3935. TEMPLATE
  3936.  
  3937.      aParam VPSpace O_EVAL Vpoint
  3938.  
  3939. DESCRIPTION
  3940.  
  3941. This returns the three floating-point values of the point evaluated from
  3942. the parameter aParam with the parameter values specified by VPSpace.
  3943.  
  3944. The vector components of VPSpace correspond to the r (Time), s and t
  3945. dimensions.
  3946.  
  3947. Note:
  3948. The operand aParam must point to a valid parameter or an error will
  3949. result.
  3950.  
  3951. EXAMPLE
  3952.  
  3953.      ( get the address of a valid parameter )
  3954.      "/Root/ellipse" O_FIND
  3955.  
  3956.      ( specify the Parameter Space coordinates )
  3957.      0.5 0.0 0.0
  3958.      O_EVAL
  3959.  
  3960. WORD
  3961.  
  3962.      O_FIND
  3963.  
  3964. TEMPLATE
  3965.  
  3966.      sName O_FIND aObject
  3967.  
  3968. DESCRIPTION
  3969.  
  3970. Attempts to find an object by its name. If an object is found, its address
  3971. is pushed onto the stack. If not found, NULL is returned.
  3972.  
  3973. EXAMPLE
  3974.  
  3975.      : MyRename ( sNewName sOIdName )
  3976.       O_FIND DUP
  3977.       IF
  3978.         bOFO_NAME + CPY
  3979.       ELSE
  3980.         DROP
  3981.       ENDIF
  3982.      ;
  3983.  
  3984. "myrect" "/Root/Level/rectangle" MyRename
  3985.  
  3986. WORD
  3987.  
  3988.      O_FINDTAG
  3989.  
  3990. TEMPLATE
  3991.  
  3992.      aObject sTagID O_FNDTAG aTagAddr
  3993.  
  3994.                             - REFERENCE 3.50 -
  3995.  
  3996. DESCRIPTION
  3997.  
  3998. Attempts to find the tag specified by sTagID from the object specified by
  3999. the address aObject. It returns the address of the Tag ID if the tag is
  4000. found.
  4001.  
  4002. note:
  4003. See O_CRETAG for Note: S about Tag ID, Tag Field and Tag Values.
  4004.  
  4005. EXAMPLE
  4006.  
  4007.      : TagTest
  4008.       "/Root/Level" O_FIND
  4009.       "FMAS" O_FNDTAG
  4010.       IF
  4011.         "Yes" PUTS
  4012.       ELSE
  4013.         "FMAS not found" PUTS
  4014.       ENDIF
  4015.      ;
  4016.  
  4017. WORD
  4018.  
  4019.      O_FINDWILD
  4020.  
  4021. TEMPLATE
  4022.  
  4023.      sWild O_FINDWILD 0 aObject1 [aObjectn ..]
  4024.  
  4025. DESCRIPTION
  4026.  
  4027. Attempts to find objects whose name matches the given wild-card, and
  4028. pushes the address for each match onto the stack. Zero is used for
  4029. terminating this address list.
  4030.  
  4031. The wild-card characters available are:
  4032.  
  4033. *  - any number of any characters
  4034. ?  - any single character
  4035. .  - current level
  4036. .. - parent level
  4037. /  - level separator
  4038.  
  4039. Note:
  4040. The list of object addresses can be used directly by the M_words.
  4041.  
  4042. EXAMPLE
  4043.  
  4044.      ( move all objects at the current level )
  4045.      ( whose name ends with "le" )
  4046.      "* le" O_FINDWILD
  4047.      0.10 0 0 M_MOVE
  4048.      REFRESH
  4049.  
  4050. WORD
  4051.  
  4052.      O_GETCUR
  4053.  
  4054. TEMPLATE
  4055.  
  4056.      O_GETCUR aCurrent
  4057.  
  4058. DESCRIPTION
  4059.  
  4060. Returns the address of the current level.
  4061.  
  4062. EXAMPLE
  4063.  
  4064.      ( pop up one level )
  4065.  
  4066.      O_GETCUR O_GETPAR O_CURRENT
  4067.  
  4068. WORD
  4069.  
  4070.      O_GETNEXT
  4071.  
  4072. TEMPLATE
  4073.  
  4074.      aObject O_GETNEXT aNextObj
  4075.  
  4076. DESCRIPTION
  4077.  
  4078. Returns the address of the next object in the hierarchy at the same level
  4079. as aObject, unless the object was the last in which case NULL is returned.
  4080.  
  4081.                             - REFERENCE 3.51 -
  4082.  
  4083. EXAMPLE
  4084.  
  4085.      : PrintLevel ( aLevel )
  4086.       O_GETSUB
  4087.       BEGIN
  4088.         DUP
  4089.       WHILE
  4090.         DUP bOFO_NAME + PUTS
  4091.         O_GETNEXT
  4092.       REPEAT
  4093.         DROP
  4094.      ;
  4095.  
  4096. ( print objects inside the current level )
  4097. O_GETCUR PrintLevel
  4098.  
  4099. WORD
  4100.  
  4101.      O_GETPAR
  4102.  
  4103. TEMPLATE
  4104.  
  4105.      aObject O_GETPAR aParent
  4106.  
  4107. DESCRIPTION
  4108.  
  4109. This returns the address of the of the parent of the object pointed by
  4110. aObject unless there is no parent i.e. aObject is the Root level.
  4111.  
  4112. Note:
  4113. This works only if the object is linked to the object data structure.
  4114.  
  4115. WORD
  4116.  
  4117.      O_GETPREV
  4118.  
  4119. TEMPLATE
  4120.  
  4121.      aObject O_GETPREV aPrevObj
  4122.  
  4123. DESCRIPTION
  4124.  
  4125. This takes a pointer to an object as its operand, and returns a pointer
  4126. to the previous object at the same hierarchy level. If there is no
  4127. previous object, NULL is returned.
  4128.  
  4129. Note:
  4130. Due to the internal implementation, it is faster to fetch the address of
  4131. the next object than the previous one. This word works only if the object
  4132. is linked to the object data structure.
  4133.  
  4134. WORD
  4135.  
  4136.      O_GETSEL
  4137.  
  4138. TEMPLATE
  4139.  
  4140.      O_GETSEL 0 aObject1 [aOjectn ..]
  4141.  
  4142. DESCRIPTION
  4143.  
  4144. Returns a list of obJect addresses to the selected obJects. The list is
  4145. terminated with zero.
  4146.  
  4147. EXAMPLE
  4148.  
  4149. ( move selected obJects )
  4150.  
  4151.      O_GETSEL
  4152.      0.1 1.0 0 0 M_MOVE
  4153.      REFRESH
  4154.  
  4155. WORD
  4156.  
  4157.      O_GETSUB
  4158.  
  4159. TEMPLATE
  4160.  
  4161.      aObJect O_GETSUB aFirstSub
  4162.  
  4163.                             - REFERENCE 3.52 -
  4164.  
  4165. DESCRIPTION
  4166.  
  4167. This returns the address of the first sub-object of aObject unless it
  4168. contains no sub-obJects, in which case 0 is returned.
  4169.  
  4170. WORD
  4171.  
  4172.      O_LOCK
  4173.  
  4174. TEMPLATE
  4175.  
  4176.      iAccess O_LOCK
  4177.  
  4178. DESCRIPTION
  4179.  
  4180. Locks or unlocks the obJect data structure (hierarchy) according to the
  4181. value of iAccess as specified below:
  4182.  
  4183. LOCK_REMOVE    - Unlocks the obJect data
  4184.  
  4185. LOCK_EXCLUSIVE - Tries to lock the data exclusively so that no other task
  4186.                  can access it. If the data is already locked, the task in
  4187.                  question goes to sleep.
  4188.  
  4189. LOCK_SHARED    - Tries to get shared access to the data structure. Several
  4190.                  tasks can access the data structure if they all use
  4191.                  shared access.
  4192.  
  4193. For more details about locking and task access See: "Amiga ROM Kernel
  4194. Reference Manual: Exec"
  4195.  
  4196. EXAMPLE
  4197.  
  4198. LOCK_EXCLUSIVE O_LOCK ( lock object data
  4199. "/Root/re*" O_FIND O_DELETE ( delete object
  4200. LOCK_REMOVE O_LOCK ( unlock )
  4201.  
  4202. SEE ALSO
  4203.  
  4204.      MAT_LOCK
  4205.  
  4206. WORD
  4207.  
  4208.      O_PROP
  4209.  
  4210. TEMPLATE
  4211.  
  4212.      aObject IProperty O_PROP ....
  4213.  
  4214. PARAMETERS
  4215.  
  4216.      aObject - pointer to object
  4217.  
  4218. IProperty - flags defining what properties the word should fetch:
  4219.  
  4220. iOP_COG   - Center of gravity
  4221.  
  4222. iOP_ SIZE - Size of the object
  4223.  
  4224. iOP_ DIR  - direction
  4225.  
  4226. iOP_MASS  - the mass of the object.
  4227.  
  4228. RETURNS
  4229.  
  4230. The number of return values depends on the IProperty flags as follows:
  4231.  
  4232. Property Return value
  4233.  
  4234. iOP_COG     A vector
  4235.  
  4236. iOP_DIR     Three vectors (coordinate system) defining the object space
  4237.  
  4238. iOP_SIZE    A float value defining the radius of the bounding sphere
  4239.  
  4240. iOP_MASS    A float value defining the mass of the object
  4241.  
  4242. Parameters are pushed on the stack in this order.
  4243.  
  4244. DESCRIPTION
  4245.  
  4246. Takes the object and property flags and returns corresponding properties
  4247. of the object on the stack.
  4248.  
  4249.                             - REFERENCE 3.53 -
  4250.  
  4251. EXAMPLE
  4252.  
  4253.      ( Print out the size of the current level
  4254.      O_GETCURR iOP_SIZE O_PROP F.
  4255.  
  4256.      ( Print out the size and the mass
  4257.      ( of the current level
  4258.      O_GETCURR iOP_MASS iOP_SIZE
  4259.      BOR O_PROP F.F.
  4260.  
  4261.      ( word printing the distance between
  4262.      ( given objects
  4263.      : PrintDist ( aObj1 aObj2 )
  4264.       iOP_COG O_PROP ( COG of the 1st object
  4265.       4 ROLL
  4266.       iOP_COG O_PROP ( COG of the 2nd obJect
  4267.       VSUB ( subtract COGs
  4268.       VLEN ( length of the vector
  4269.       F.
  4270.      ;
  4271.  
  4272. WORD
  4273.  
  4274.      O_SCAN
  4275.  
  4276. TEMPLATE
  4277.  
  4278.      aObject aCFA O_SCAN e
  4279.  
  4280. DESCRIPTION
  4281.  
  4282. Object scan and execute. This parses the hierarchical structure of the
  4283. object pointed to by aObject and executes the RPL word pointed by aCFA for
  4284. each sub-object.
  4285.  
  4286. The RPL word executed receives the address of the current obJect as a
  4287. parameter on the stack and must return a non-zero value to continue the
  4288. scan or zero to stop.
  4289.  
  4290. O_SCAN returns the value from the executed word.
  4291.  
  4292. EXAMPLE
  4293.  
  4294.      : PrintName
  4295.       bOFO_NAME + PUTS ( print the name )
  4296.       1 ( return 1 to continue scanning )
  4297.      ;
  4298.  
  4299.      "/Root" O_FIND & PrintName O_SCAN DROP
  4300. WORD
  4301.  
  4302.      O_SELECT
  4303.  
  4304. TEMPLATE
  4305.  
  4306.      0 aObJect1 [aObJectn ..] O_SELECT
  4307.  
  4308. DESCRIPTION
  4309.  
  4310. Objects whose address is supplied as an operand become selected.
  4311.  
  4312. Note:
  4313. This word is useful for creating macros which select targets for menu
  4314. function modifications.
  4315.  
  4316. EXAMPLE
  4317.  
  4318.      ( find and select all rectangles )
  4319.      ( at the current level )
  4320.      "rectangle*" O_FINDWILD
  4321.      O_SELECT
  4322.      REFRESH
  4323.  
  4324.                             - REFERENCE 3.54 -
  4325.  
  4326. 3.5 ANIMATION WORDS
  4327.  
  4328. WORD
  4329.  
  4330.      ASPEC
  4331.  
  4332. TEMPLATE
  4333.  
  4334.      iFrameResol
  4335.      fStartTime
  4336.      sFileName
  4337.      iFlags
  4338.      sFormatString
  4339.      sScrName
  4340.      sFrameComm
  4341.      iCurrFrame
  4342.      iSamples
  4343.      fSeconds
  4344.      ASPEC
  4345.  
  4346. DESCRIPTION
  4347.  
  4348. Animation settings. The parameters of this word correspond the contents
  4349. of the Animation window.
  4350.  
  4351. iFlags parameter can contain the following bits:
  4352.  
  4353. iAF_SAVE - save rendered frames
  4354. iAF_WIRE - preview
  4355. iAF_GOTO - go directly to given EndTime
  4356.  
  4357. EXAMPLE
  4358.  
  4359. 40          ( frame resolution )
  4360. 0           ( current time )
  4361. "ram:test"  ( filename )
  4362. iAF_SAVE    ( flags )
  4363. "%s%d"      ( format )
  4364. "Real.1"    ( screen name )
  4365. ""          ( frame command )
  4366. 0           ( current frame )
  4367. 0           ( samples )
  4368. 1.0         ( seconds )
  4369. ASPEC
  4370.  
  4371. 0 0 1.0 PLAY ( play the animation )
  4372.  
  4373. SEE ALSO
  4374.  
  4375.      PLAY
  4376.  
  4377. WORD
  4378.  
  4379.      PLAY
  4380.  
  4381. TEMPLATE
  4382.  
  4383.      aObject aMethod fEndTime PLAY
  4384.  
  4385. PARAMETERS
  4386.  
  4387. aObject, aMethod - Set these to NULL fEndTime - time value between 0 ... 1
  4388.  
  4389. DESCRIPTION
  4390.  
  4391. Plays the animation to the given time using the current animation
  4392. settings.
  4393.  
  4394. If the given time is less than the current time, the animation is played
  4395. backwards.
  4396.  
  4397. Note:
  4398. The first two parameters MUST be set to 0 for future compatibility.
  4399.  
  4400. EXAMPLE
  4401.  
  4402.      : Forwars
  4403.       0 0 1.0 PLAY
  4404.      ;
  4405.  
  4406.      : Backwards
  4407.       0 0 0.0 PLAY
  4408.      ;
  4409.  
  4410.      : DoTwice
  4411.       Forwards
  4412.       Backwards
  4413.      ;
  4414.  
  4415.      DoTwice
  4416.  
  4417.                             - REFERENCE 3.55 -
  4418.  
  4419. WORD
  4420.  
  4421.      MTH_CREATE
  4422.  
  4423. TEMPLATE 
  4424.  
  4425.      aWord sName MTH_CREATE aMthAddr
  4426.  
  4427. DESCRIPTION
  4428.  
  4429. Creates a custom method to REAL 3D's Method list. The new method can then
  4430. be assigned to objects as if it was one of the built-in methods.
  4431.  
  4432. The a Word operand contains the address of the RPL word to be used by the
  4433. method and sName specifies the name of the custom method as it will appear
  4434. on the list. This can be up to 15 characters long; if a longer string
  4435. is supplied, it will be truncated.
  4436.  
  4437. The word returns the address of the method data.
  4438.  
  4439. When an animation is played, this word is called with the following
  4440. syntax:
  4441.  
  4442. aNewTime aMthTime aMthObj aParentObj XXXXXXX
  4443.  
  4444. where
  4445.  
  4446. aNewTime - the address of the vector defining the new time.
  4447.  
  4448. aMthTime - the address of the vector describing the current method time.
  4449.            If aNewTime is different than aMthTime, the method should "do
  4450.            something".
  4451.  
  4452. aMthObj -  the address of the object to which the method procedure was
  4453.            associated.
  4454.  
  4455. aParObj - the address of the parent object of aMthObj.
  4456.  
  4457. Also the following variables are defined during the animation:
  4458.  
  4459. o1         - method object
  4460. o2         - parent object
  4461. t, u, v    - new time
  4462. fx, fy, fz - method's current time
  4463. dt         - time interval
  4464.  
  4465. EXAMPLE
  4466.  
  4467.      : ColorProc
  4468.         0 o2 @ ( address of object to be modified
  4469.       t 255 *                ( R
  4470.       RANDOM 255 *           ( G
  4471.       t 6.28*SIN 127 * 128 + ( B
  4472.       0             ( A
  4473.       2             ( register color
  4474.       0             ( iFlags
  4475.       M_COLOR
  4476.      ;
  4477.  
  4478. & ColorProc "Color" MTH_CREATE DROP
  4479.  
  4480. WORD
  4481.  
  4482.      MTH_DELETE
  4483.  
  4484. TEMPLATE
  4485.  
  4486.      aMthAddr MTH_DELETE
  4487.  
  4488. DESCRIPTION
  4489.  
  4490. Deletes the custom method specified by aMthAddr from the Method list.
  4491.  
  4492. WORK
  4493.  
  4494.      MTH_FIND
  4495.  
  4496. TEMPLATE
  4497.  
  4498.      sName MTH_FIND aMthAddr
  4499.  
  4500.                             - REFERENCE 3.56 -
  4501.  
  4502. DESCRIPTION
  4503.  
  4504. Returns the address of the method given its name.
  4505.  
  4506. Note:
  4507. Do not use this word if you don't know the internal structure of the
  4508. method.
  4509.  
  4510. 3.6 I/O WORDS
  4511.  
  4512. WORD
  4513.  
  4514.      FIL_LOAD
  4515.  
  4516. TEMPLATE
  4517.  
  4518.      sFile iSections iReplace FIL_LOAD
  4519.  
  4520. DESCRIPTION
  4521.  
  4522. Loads the data sections specified by the bits of iSections from a REAL 3D
  4523. Binary Format IFF file defined by the name sFile. The variable iReplace
  4524. defines which sections replace the existing ones and which sections are
  4525. inserted.
  4526.  
  4527. The bits of iSections and iReplace select the Data Sections (REAL 3D IFF
  4528. HUNKS) in the following way:
  4529.  
  4530. HUNK DESCRIPTION
  4531.  
  4532.      RSCR Screens
  4533.      RWIN Windows
  4534.      RINF Measuring System
  4535.      RSTT Global Settings
  4536.      RGRI Grids
  4537.      RREN Render Settings
  4538.      RANI Animation Settings
  4539.      RATT Default Primitive Attributes
  4540.      ROBJ Objects
  4541.      RMTR Materials
  4542.      RCOL Named Colors
  4543.      RRPL RPL Text
  4544.  
  4545. Note:
  4546. The Version Hunk RVRS is always loaded.
  4547.  
  4548. EXAMPLE
  4549.  
  4550.      "io.rpl" LOAD
  4551.  
  4552.      ( insert all sections found )
  4553.      "MyProject" IRIO_ALL 0 FIL_LOAD
  4554.  
  4555.      ( insert all except objects )
  4556.       "MyProject" IRIO_ALL IRIO_ROBJ FIL_LOAD
  4557.  
  4558. WORD
  4559.  
  4560.      FIL_SAVE
  4561.  
  4562. TEMPLATE
  4563.  
  4564.      sFile iSections iFlags FIL_SAVE
  4565.  
  4566. DESCRIPTION
  4567.  
  4568. Saves the data sections specified by the bits of iSections to the file
  4569. specified in sFile using REAL 3D binary format.
  4570.  
  4571. Note:
  4572. See FIL_LOAD for the data sections bits and Note:s about iFlags. FIL_SAVE
  4573. always saves the Version Hunk.
  4574.  
  4575.                             - REFERENCE 3.57 -
  4576.  
  4577. 3.7 MATERIAL WORDS
  4578.  
  4579. WORD
  4580.  
  4581.      MAT_CREATE
  4582.  
  4583. TEMPLATE
  4584.  
  4585.      sName
  4586.      wSpecularity
  4587.      wSpecBright
  4588.      wBrilliance
  4589.      wTransparancy
  4590.      wTurbidity
  4591.      wRefraction
  4592.      wCurlndex
  4593.      wEffect
  4594.      wRESERVED
  4595.      wRoughness
  4596.      wFlags
  4597.      wTurbSatur
  4598.      wMapMethods
  4599.      wRESERVED
  4600.      wFreqX
  4601.      wFreqY
  4602.      fSplineU
  4603.      fSplineV
  4604.      fSplineW
  4605.      fSplineH
  4606.      wRESERVED
  4607.      sImage
  4608.      bR bG bB bA
  4609.      wBumpHeight
  4610.      wDither
  4611.      wScopeHandle
  4612.         sScopeExpr fScope_a fScope_b
  4613.      wMapHandle
  4614.         sMapExpr fMap_a fMap_b
  4615.      wBumpHandle
  4616.         sBumpExpr fBump_a fBump_b
  4617.      wIndexHandle
  4618.         sIndexExpr fIndex_a fIndex_b
  4619.      TagList
  4620.      MAT_CREATE aMaterial
  4621.  
  4622. OPERANDS
  4623.  
  4624. wFlags
  4625.  
  4626. The bits of this integer specify various material properties.
  4627.  
  4628.      wMTF_TRANCOL
  4629.      wMTF_UNSHADED
  4630.      wMTF_TILEX
  4631.      wMTF_TILEY
  4632.      wMTF_FLIPX
  4633.      wMTF_FLIPY
  4634.      wMTF_GRADEX
  4635.      wMTF_GRADEY
  4636.      wMTF_SPLINEMAP
  4637.      wMTF_SCOPEMASK
  4638.      wMTF_NOREFL
  4639.      wMTF_EXCL
  4640.      wMTF_SMOOTH
  4641.  
  4642. wMapMethods
  4643.  
  4644. The bits of this integer specify the mapping types:
  4645.  
  4646.      wMM_COLOR
  4647.      wMM_BUMP
  4648.      wMM_BRILL
  4649.      wMM_TRANSP
  4650.      wMM_CLIP
  4651.      wMM_SHADOW
  4652.      wMM_ENVIRONM
  4653.  
  4654. DESCRIPTION
  4655.  
  4656. Creates a material in the material library using the name specified with
  4657. sName. It returns the address of the material created.
  4658.  
  4659. WORD
  4660.  
  4661.      MAT_DELETE
  4662.  
  4663. TEMPLATE
  4664.  
  4665.      aMaterial MAT_DELETE
  4666.  
  4667.                             - REFERENCE 3.58 -
  4668.  
  4669. DESCRIPTION
  4670.  
  4671. Deletes the material pointed by aMaterial from the material library.
  4672.  
  4673. WORD
  4674.  
  4675.      MAT_FIND
  4676.  
  4677. TEMPLATE
  4678.  
  4679.      sName MAT_FIND aMaterial
  4680.  
  4681. DESCRIPTION
  4682.  
  4683. Searches the material specified by sName from the material library and
  4684. returns its address, or zero if the search failed.
  4685.  
  4686. WORD
  4687.  
  4688.      MAT_LOCK
  4689.  
  4690. TEMPLATE
  4691.  
  4692.      iAccess MAT_LOCK
  4693.  
  4694. DESCRIPTION
  4695.  
  4696.      Locks or unlocks the material data structure (material library) so
  4697. that tasks can access it safely.
  4698.  
  4699. Note:
  4700. THE MATERIAL DATA STRUCTURE MUST BE LOCKED BEFORE ANY ACCESS FROM RPL
  4701. CODE. Failure to do so may cause RPL code to crash the system. The
  4702. material data structure should be unlocked as soon as possible, because
  4703. locking prevents other tasks from accessing it.
  4704.  
  4705. If the RPL code only reads materials then shared access can be used. If
  4706. it changes materials, (MAT CREATE, MAT DELETE etc.), then exclusive
  4707. access MUST be used.
  4708.  
  4709. See: 4.4 O_LOCK for details of locking and iAccess.
  4710.  
  4711. 3.8 MISCELLANEOUS WORDS
  4712.  
  4713. WORD
  4714.  
  4715.      ERR_INSTALL
  4716.  
  4717. TEMPLATE
  4718.  
  4719.      aErrHook ERR_INSTALL
  4720.  
  4721. PARAMETERS
  4722.  
  4723. aErrHook - address of the word to be called when an error occurs
  4724.  
  4725. DESCRIPTION
  4726.  
  4727. Installs a new error hook word to the RPL environment. When an error
  4728. occurs the defined word is called. The number of possible hooks is not
  4729. restricted in any way and they are called so that the hook installed
  4730. first is called last. The called error hook word is removed by the system.
  4731.  
  4732. This word is usually needed for error handling. If a RPL program allocates
  4733. any system resources, it should also deallocate them when the program is
  4734. terminated.
  4735.  
  4736. Note:
  4737. Error hooks cannot be nested. In other words, you cannot install error
  4738. hook word for another error hook word.
  4739.  
  4740. SEE ALSO
  4741.  
  4742.      ERR_REMOVE
  4743.  
  4744.                             - REFERENCE 3.59 -
  4745.  
  4746. EXAMPLE
  4747.  
  4748. VARIABLE aMem
  4749.  
  4750.      : MyErrHook
  4751.       "All Right"
  4752.       "This is my own error handler"
  4753.       GET_KEY DROP
  4754.         aMem @ 512 MEM_FREE
  4755.      ;
  4756.  
  4757.      : DoSomething
  4758.  
  4759.       ( allocate some memory )
  4760.       512 0 MEM_ALLOC aMem !
  4761.  
  4762.       ( install error hook )
  4763.       & MyErrHook ERR_INSTALL
  4764.  
  4765.       ( then do something which causes error )
  4766.       #@!)=?
  4767.  
  4768.       ( this is the normal exit procedure )
  4769.       ( when everything went OK )
  4770.       & MyErrHook ERR_REMOVE
  4771.       aMem @ 512 MEM_FREE
  4772.      ;
  4773.  
  4774.      DoSomething
  4775.  
  4776. WORD
  4777.  
  4778.      ERR_REMOVE
  4779.  
  4780. TEMPLATE
  4781.  
  4782.      aErrHook ERR_REMOVE
  4783.  
  4784. PARAMETERS
  4785.  
  4786. aErrHook - address of the RPL word installed with ERR_INSTALL
  4787.  
  4788. DESCRIPTION
  4789.  
  4790. Removes an error hook word from the RPL environment. If the given RPL
  4791. word is not installed, an error message is produced.
  4792.  
  4793. SEE ALSO
  4794.  
  4795.      ERR_INSTALL
  4796.  
  4797. EXAMPLE
  4798.  
  4799.      : MyErrHandler
  4800.       ( .... )
  4801.      ;
  4802.  
  4803.      & MyErrHandler ERR_INSTALL
  4804.      ( .... )
  4805.      & MyErrHandler ERR_REMOVE
  4806.  
  4807. WORD
  4808.  
  4809.      MEM_ALLOC
  4810.  
  4811. TEMPLATE
  4812.  
  4813.      iSize iFlags ALLOC aAddr
  4814.  
  4815. PARAMETERS
  4816.  
  4817.      iSize - the amount of memory to be allocated
  4818.  
  4819.      iFlags - must be 0
  4820.  
  4821. RETURNS
  4822.  
  4823. aAddr - the addres of the allocated memory
  4824.  
  4825.                             - REFERENCE 3.60 -
  4826.  
  4827. DESCRIPTION
  4828.  
  4829. Allocates given amount of memory from the system and returns the address
  4830. of the allocated hunk. If allocation fails, 0 is returned.
  4831.  
  4832. SEE ALSO
  4833.  
  4834.      MEM_FREE
  4835.  
  4836. EXAMPLE
  4837.  
  4838.      VARIABLE aMyStr
  4839.  
  4840.      : AllocExample ( allocate 64 bytes of memory
  4841.       64 0 MEM_ALLOC aMyStr !
  4842.       aMyStr @ 63 "Enter any string" GET_STR
  4843.       IF
  4844.       aMyStr @ PUTS
  4845.       ENDIF
  4846.       aMyStr @ 64 MEM_FREE
  4847.      ;
  4848.  
  4849. WORD
  4850.  
  4851.      MEM_FREE
  4852.  
  4853. TEMPLATE
  4854.  
  4855.      aAddr iSize MEM_FREE
  4856.  
  4857. PARAMETERS
  4858.  
  4859. aAddr - the address of the memory to be freed
  4860. iSize - the size of the memory to be freed
  4861.  
  4862. DESCRIPTION
  4863.  
  4864. Frees the memory allocated by MEM_ALLOC.
  4865.  
  4866. SEE ALSO
  4867.  
  4868.      MEM_ALLOC
  4869.  
  4870. WORD
  4871.  
  4872.      INHERIT
  4873.  
  4874. TEMPLATE
  4875.  
  4876.      sName INHERIT
  4877.  
  4878. DESCRIPTION
  4879.  
  4880. The operand sName must be a valid RPL Environment (e.g. an existing RPL
  4881. Window). The current RPL environment then inherits the vocabulary from
  4882. this environment. When RPL looks for a word, the local vocabulary will
  4883. be searched first, then any inherited definitions will be examined.
  4884.  
  4885. INHERIT does not enable closed inheritance "loops". If an environment
  4886. attempts to INHERIT from an environment that has already inherited the
  4887. first one, then INHERIT will be ignored.
  4888.  
  4889. There is one special RPL Environment called "Master" which is used for
  4890. processing Macros and AREXX commands. This environment is created
  4891. automatically by REAL 3D and does not have a window associated with it.
  4892.  
  4893. EXAMPLE
  4894.  
  4895.      "RPL.1" INHERIT
  4896.  
  4897. WORD
  4898.  
  4899.      MENU
  4900.  
  4901. TEMPLATE
  4902.  
  4903.      iMenu iItem iSubItem MENU
  4904.  
  4905. DESCRIPTION
  4906.  
  4907. This word executes the menu function specified by the operands exactly as
  4908. if it was selected using the mouse.
  4909.  
  4910. Menus are numbered from zero starting from the top left.
  4911.  
  4912.                             - REFERENCE 3.61 -
  4913.  
  4914. Menu separators are counted as menu items. All three operands must be
  4915. supplied even if there is no Sub-Menu. For a listing of the menu items
  4916. and their three selection operands see the appendix B.
  4917.  
  4918. EXAMPLE
  4919.  
  4920.      2 2 1 MENU ( MODIFY/Properties/Name )
  4921.  
  4922. WORD
  4923.  
  4924.      REFRESH
  4925.  
  4926. TEMPLATE
  4927.  
  4928.      REFRESH
  4929.  
  4930. DESCRIPTION
  4931.  
  4932. Refreshes all windows using their individual refresh settings.
  4933.  
  4934. WORD
  4935.  
  4936.      RENDER
  4937.  
  4938. TEMPLATE
  4939.  
  4940.      RENDER
  4941.  
  4942. DESCRIPTION
  4943.  
  4944. Renders all Views using their individual render settings
  4945.  
  4946. WORD
  4947.  
  4948.      ROT_COORD
  4949.  
  4950. TEMPLATE
  4951.  
  4952.      fxAngle fyAngle fzAngle aCoord ROT_COORD
  4953.  
  4954. DESCRIPTION
  4955.  
  4956. This rotates three vectors Vx, Vy, Vz in an array pointed by aCoord,
  4957. around each other by the angles (in radians) specified by fxAngle, fyAngle
  4958. & fzAngle. First Vy and Vz are rotated around Vx by fxAngle, then in the
  4959. resulting system Vz and Vx are rotated around Vy by fyAngle etc.
  4960.  
  4961. Note:
  4962. Used extensively by the RPL Libraries.
  4963.  
  4964. WORD
  4965.  
  4966.      SCR_SAVE
  4967.  
  4968. TEMPLATE
  4969.  
  4970.      sScreen sFile SCR_SAVE I
  4971.  
  4972. DESCRIPTION
  4973.  
  4974. Saves the screen having the name sScreen to the file whose name is defined
  4975. by sFile. It returns TRUE if the screen was found and saved, otherwise it
  4976. returns FALSE.
  4977.  
  4978. EXAMPLE
  4979.  
  4980.      "Real3D" "RAM:Real3D.IFF" SCR_SAVE
  4981.  
  4982. WORD
  4983.  
  4984.      SYSTEM
  4985.  
  4986. TEMPLATE
  4987.  
  4988.      sCLI SYSTEM
  4989.  
  4990. DESCRIPTION
  4991.  
  4992. This passes the string sCLI to the OS CLI for execution.
  4993.  
  4994.                             - REFERENCE 3.62 -
  4995.  
  4996. EXAMPLE
  4997.  
  4998.      "SYS:Tools/IconEdit" SYSTEM
  4999.  
  5000. WORD
  5001.  
  5002.      WND_ADDR
  5003.  
  5004. TEMPLATE
  5005.  
  5006.      sName WND_ADDR aWnd
  5007.  
  5008. PARAMETERS
  5009.  
  5010.      sName - the name of any window
  5011.  
  5012. RETURNS
  5013.  
  5014.      aWnd - the address of the window
  5015.  
  5016. DESCRIPTION
  5017.  
  5018. Returns the address of the window whose name is aName. If the window
  5019. cannot be found, returns NULL.
  5020.  
  5021. Note:
  5022. Don't use this word if you don't know the internal structure of the window
  5023. in question.
  5024.  
  5025. WORD
  5026.  
  5027.      WND_OPEN
  5028.  
  5029. TEMPLATE
  5030.  
  5031. iType sName iLeft iTop Width iHeight WND_OPEN
  5032.  
  5033. PARAMETERS
  5034.  
  5035. iType - the type of the window to be opened. Can be one of the following:
  5036.  
  5037.      iWT_SELECT
  5038.      iWT_PROJECT
  5039.      iWT_PROJECTSB
  5040.      iWT_PROJECTBL
  5041.      iWT_SHELL
  5042.      iWT_TOOL
  5043.      iWT_ANIMCTRL
  5044.      iWT_COLCTRL
  5045.      iWT_PROJECTDB
  5046.      iWT_MATCTRL
  5047.      iWT_SCRCTRL
  5048.  
  5049. sName           - Name for the window.
  5050.  
  5051. iLeft, iTop     - Top left edge of the window
  5052.  
  5053. wWidth, iHeight - Size of the window
  5054.  
  5055. DESCRIPTION
  5056.  
  5057. Opens a Real 3D window.
  5058.  
  5059. EXAMPLE
  5060.  
  5061.      ( open the select window )
  5062.  
  5063.      "editor.rpl" LOAD
  5064.  
  5065.      iWT_SELECT "MyWindow" 100 10 150 100
  5066.      WND_OPEN
  5067.  
  5068. WORD
  5069.  
  5070.      WND_SENDMSG
  5071.  
  5072. TEMPLATE
  5073.  
  5074.      0 aPn ... aP1 aWndName iMsglde
  5075.      WND_SENDMSG iMsgNum
  5076.  
  5077. PARAMETERS
  5078.  
  5079.      0 aPn ... aP1 - the addresses of parameters to be passed with the
  5080.                      message
  5081.  
  5082.      aWndName      - a string defining the target windows
  5083.  
  5084.                             - REFERENCE 3.63 -
  5085.  
  5086. iMsglde - a message identifier. Can be one of the following:
  5087.  
  5088.      iWM_ACTIVATE
  5089.      iWM_GETDATA
  5090.      iWM_INTUIMSG
  5091.      iWM_DIE
  5092.  
  5093. RETURNS
  5094.  
  5095.      iMsgNum - a number of messages sent.
  5096.  
  5097. DESCRIPTION
  5098.  
  5099. Sends a message to given windows. The parameter list maximally consists of
  5100. 5 addresses of parameters. An address 0 means that there are no more
  5101. parameters to be passed. The purpose and amount of parameters depends on
  5102. the message in question.
  5103.  
  5104. The window name can include wildcards so that it is possible to send the
  5105. message to more than one window. The return value indicates the number of
  5106. messages sent.
  5107.  
  5108. EXAMPLES
  5109.  
  5110.      Bring the palette window to the front and activate it:
  5111.  
  5112.      0 "Color" WM_ACTIVATE WND_SENDMSG DROP
  5113.  
  5114.      Kill the "Color" window:
  5115.  
  5116.      0 "Color" WM_DIE WND_SENDMSG DROP
  5117.  
  5118.      MyView window to front if exists. If not, create it:
  5119.  
  5120.      0 "MyView" iWM_ACTIVATE WND_SENDMSG
  5121.      NOT IF
  5122.      iWT_VIEW "MyView" 10 10 300 200
  5123.      WND_OPEN
  5124.      ENDIF
  5125.  
  5126. WORD
  5127.  
  5128. RAY_INTERS - Ray/surface intersection
  5129.  
  5130. TEMPLATE
  5131.  
  5132. aHandle avPos avDir avlnters avNorm RAY_PREP iResult
  5133.  
  5134. PARAMETERS
  5135.  
  5136. aHandle  - a handle from the RAY_PREP word
  5137.  
  5138. avPos    - the address of a vector defining the position of the ray
  5139.  
  5140. avDir    - the address of a vector defining the direction of the ray
  5141.  
  5142. avInters - the address of a vector to contain the intersection point
  5143.  
  5144. avNorm   - the address of a vector to contain the surface normal in the
  5145.            intersection point
  5146.  
  5147. RETURNS
  5148.  
  5149. iResult  - TRUE if intersection was detected, FALSE if no intersection
  5150.            found.
  5151.  
  5152. DESCRIPTION
  5153.  
  5154. Executes an intersection test between a given obJect (aHandle) and a given
  5155. ray (avPos and avDir). If no intersection was found, FALSE is pushed on
  5156. the stack. Otherwise the variables avPos and avDir contain the position
  5157. and the normal vector of the surface where the intersection between object
  5158. and ray was detected.
  5159.  
  5160. Note:
  5161. This word can be used for creating "behavioral" animations where objects
  5162. observe their living environment making decisions and conclusions
  5163. depending on the information they receive. For example, a flying object
  5164. can try to avoid hitting other objects a RPL method using this word.
  5165.  
  5166.                             - REFERENCE 3.64 -
  5167.  
  5168. EXAMPLE
  5169.  
  5170.      ( check if there is an object )
  5171.      ( somewhere in front of us )
  5172.  
  5173.      VVARIABLE vPos
  5174.      VVARIABLE vDir
  5175.      VVARIABLE vHit
  5176.      VVARIABLE vNrm
  5177.      VARIABLE iHnd
  5178.      100 STRING sBuff
  5179.  
  5180.      : MyCollTest
  5181.  
  5182.       ( prepare intersection )
  5183.       "/Root/Enemy" RAY_PREP iHnd !
  5184.  
  5185.       ( shoot some rays )
  5186.       0 0 0 vPos V! ( start point of the ray )
  5187.       1 0 0 vDir V! ( direction of the 1 st ray )
  5188.       iHnd vPos vDir vHit vNrm RAY_INTERS
  5189.       IF
  5190.         vHit V@
  5191.         "Hit found in position %g %g %g"
  5192.         sBuff SPRINTF
  5193.         sBuff PUTS
  5194.       ENDIF
  5195.  
  5196.       0 1 0 vDir V! ( direction of the 2nd ray )
  5197.       iHnd vPos vDir vHit vNrm RAY_INTERS
  5198.       IF
  5199.         vHit v@
  5200.         "Hit found in position %g %g %g"
  5201.         sBuff SPRINTF
  5202.         sBuff PUTS
  5203.       ENDIF
  5204.  
  5205.       ( free intersection handle )
  5206.       iHnd @ RAY_FREE
  5207.      ;
  5208.  
  5209. SEE ALSO
  5210.  
  5211.      RAY_PREP, RAY_FREE
  5212.  
  5213. WORD
  5214.  
  5215.      RAY_FREE - Free a ray intersection handle
  5216.  
  5217. TEMPLATE
  5218.  
  5219.      aHandle RAY_FREE
  5220.  
  5221. PARAMETERS
  5222.  
  5223.      aHandle - pointer to a ray intersection handle
  5224.  
  5225. DESCRIPTION
  5226.  
  5227. Deallocates the data structures needed for ray intersection testing.
  5228.  
  5229. EXAMPLE
  5230.  
  5231.      VARIABLE RayHandle
  5232.  
  5233.      "/Root/Tube" O_FIND RAY - PREP RayHandle !
  5234.  
  5235.      ....
  5236.  
  5237.      RayHandle @+RAY_FREE
  5238.  
  5239. SEE ALSO
  5240.  
  5241.      RAY_INTERS, RAY_PREP
  5242.  
  5243. WORD
  5244.  
  5245.      RAY_PREP - prepare a ray/surface intersection handle
  5246.  
  5247. TEMPLATE
  5248.  
  5249.      aObJect RAY_PREP aHandle
  5250.  
  5251. PARAMETERS
  5252.  
  5253.      aObJect - a pointer to an object
  5254.  
  5255. RETURNS
  5256.  
  5257.      aHandle - A ray intersection handle
  5258.  
  5259.                             - REFERENCE 3.65 -
  5260.  
  5261. DESCRIPTION
  5262.  
  5263. Prepares data structures needed for ray intersection testing
  5264.  
  5265. SEE ALSO
  5266.  
  5267.      RAY_INTERS, RAY_FREE
  5268.  
  5269. WORD
  5270.  
  5271.      LIB_CALL
  5272.  
  5273. TEMPLATE
  5274.  
  5275.      TagList iOffset iLibBase LIB_CALL
  5276.  
  5277. OPERANDS
  5278.  
  5279. TagList - Tag Values are addresses of operand data and Tag IDs are
  5280. register names. e.g. "A0", "D0" etc.
  5281.  
  5282. iOffset - Function offset in the library iLibBase - Library base-pointer
  5283.  
  5284. DESCRIPTION
  5285.  
  5286. Calls a library function using the given operands. The tag values are
  5287. addresses so that RPL variables can be used to pass the operands for the
  5288. library function, and return values are passed back through the same
  5289. variables.
  5290.  
  5291. EXAMPLE
  5292.  
  5293.      VARIABLE IntuiBase
  5294.      VARIABLE ScrOpernd
  5295.  
  5296.      0 "intuition.library" LIB _OPEN IntuiBase !
  5297.      0 ScrOpernd !
  5298.  
  5299.      "CEND" ( terminate tag list )
  5300.      ( See Amiga ROM Kernel Ref: AutoDocs )
  5301.      ScrOpernd "D0"
  5302.      96 ( See Amiga ROM Kernel Ref: Exec )
  5303.      IntuiBase @ ( Intuition lib. base pointer )
  5304.      LIB_CALL ( call DisplayBeep(0) )
  5305.  
  5306.      IntuiBase @ LIB_CLOSE
  5307.  
  5308. WORD
  5309.  
  5310.      LIB_CLOSE
  5311.  
  5312. TEMPLATE
  5313.  
  5314.      iLibBase LIB_CLOSE
  5315.  
  5316. OPERANDS
  5317.  
  5318.      iLibBase - Library base-pointer
  5319.  
  5320. DESCRIPTION
  5321.  
  5322. Closes an OS library.
  5323.  
  5324. Note:
  5325. If iLibBase does not point to an open library when the word is called,
  5326. system will crash.
  5327.  
  5328. WORD
  5329.  
  5330.      LIB_OPEN
  5331.  
  5332. TEMPLATE
  5333.  
  5334.      Version sName LIB_OPEN iLibBase
  5335.  
  5336. OPERANDS 
  5337.  
  5338.      iVersion - The version number of the library
  5339.      sName - The name of the library
  5340.  
  5341. RETURNS
  5342.  
  5343.      iLibBase - The library base-pointer
  5344.  
  5345. DESCRIPTION
  5346.  
  5347. Attempts to open an OS library and returns the base-pointer if succeeds
  5348. in opening, otherwise returns NULL.
  5349.  
  5350.                             - REFERENCE 3.66 -
  5351.  
  5352. 3.9 USER INTERFACE WORDS
  5353.  
  5354. WORD
  5355.  
  5356.      BUSY_CANCEL
  5357.  
  5358. TEMPLATE
  5359.  
  5360.      aHnd BUSY_CANCEL iBool
  5361.  
  5362. PARAMETERS
  5363.  
  5364.      aHnd - a return value from the BUSY_OPEN word
  5365.  
  5366. RETURNS
  5367.  
  5368.      iBool - TRUE or FALSE (1/0)
  5369.  
  5370. DESCRIPTION
  5371.  
  5372. Checks whether or not the user has pressed the CANCEL gadget of a given
  5373. busy requester. If the gadget is pressed, TRUE is pushed on the stack,
  5374. otherwise FALSE.
  5375.  
  5376. SEE ALSO
  5377.  
  5378.      BUSY_OPEN, BUSY_CLOSE, BUSY_UPDATE
  5379.  
  5380. EXAMPLE
  5381.  
  5382.      VARIABLE aBusyHnd
  5383.  
  5384.      : BusyTest
  5385.       100 0 DO
  5386.         aBusyHnd @ "Rendering..."
  5387.         I BUSY_UPDATE ( Rendering )
  5388.           aBusyHnd @ BUSY_CANCEL
  5389.         IF
  5390.           LEAVE
  5391.         ENDIF
  5392.       LOOP
  5393.       aBusyHnd @ BUSY_CLOSE
  5394.      ;
  5395.  
  5396. WORD
  5397.  
  5398.      BUSY_CLOSE
  5399.  
  5400. TEMPLATE
  5401.  
  5402.      aHnd BUSY_CLOSE
  5403.  
  5404. PARAMETERS
  5405.  
  5406.      aHnd - a return value from the BUSY_ OPEN word
  5407.  
  5408. DESCRIPTION
  5409.  
  5410. Closes a given busy requester.
  5411.  
  5412. SEE ALSO
  5413.  
  5414.      BUSY_OPEN, BUSY_UPDATE, BUSY_CANCEL
  5415.  
  5416. EXAMPLE
  5417.  
  5418.      aBusyHnd @ BUSY_CLOSE
  5419.  
  5420. WORD
  5421.  
  5422.      BUSY_OPEN
  5423.  
  5424. TEMPLATE
  5425.      sHeader BUSY_OPEN aHnd
  5426.  
  5427. PARAMETERS
  5428.  
  5429.      sHeader - title string
  5430.  
  5431. RETURN
  5432.  
  5433.      aHnd - address of the busy requester.
  5434.  
  5435.                             - REFERENCE 3.67 -
  5436.  
  5437. DESCRIPTION
  5438.  
  5439. Opens a busy requester with the given header text and returns a handle
  5440. which can be used for updating the busy requester and checking whether the
  5441. user has requested cancelling.
  5442.  
  5443. SEE ALSO
  5444.  
  5445.      BUSY_CANCEL, BUSY_CLOSE, BUSY_UPDATE
  5446.  
  5447. EXAMPLE
  5448.  
  5449.      VARIABLE aHnd
  5450.  
  5451.      : MyAnimation
  5452.       "Rendering Animation..." BUSY_OPEN aHnd !
  5453.       100 0 DO
  5454.         O_GETSEL
  5455.         0.1 0 0 0 M_MOVE
  5456.         REFRESH
  5457.         aHnd @ 0 I BUSY_UPDATE
  5458.       LOOP
  5459.       aHnd @ BUSY_CLOSE
  5460.      ;
  5461.  
  5462. WORD
  5463.  
  5464.      BUSY_UPDATE
  5465.  
  5466. TEMPLATE
  5467.  
  5468.      aHnd aNewHdr iPer BUSY_UPDATE
  5469.  
  5470. PARAMETERS
  5471.  
  5472.      aHnd   - a return value from the BUSY_OPEN word
  5473.  
  5474.      NewHdr - a new a header text for the requester
  5475.  
  5476.      iPer   - value between 0 and 100.
  5477.  
  5478. DESCRIPTION
  5479.  
  5480. Updates the contents of the busy requester. If the aNewHdr parameter is
  5481. not 0, then it is assumed to be the address of the new header text for the
  5482. requester. If it is NULL, the header text of the requester is not changed.
  5483. The iPer parameter must be between 0 and 100.
  5484.  
  5485. SEE ALSO
  5486.  
  5487.      BUSY_OPEN, BUSY_CLOSE, BUSY_CANCEL
  5488.  
  5489. EXAMPLE
  5490.  
  5491.      VARIABLE aBusyHnd
  5492.  
  5493.      : BusyTest
  5494.       "Optimizing ..." BUSY_OPEN aBusyHnd !
  5495.       100 0
  5496.         aBusyHnd @+0 I
  5497.         BUSY_UPDATE ( Optimizing )
  5498.           LOOP
  5499.           100 0 DO
  5500.         aBusyHnd @ "Rendering..." I
  5501.         BUSY_UPDATE ( Rendering )
  5502.           LOOP
  5503.       aBusyHnd @ BUSY_CLOSE
  5504.      ;
  5505.  
  5506. WORD
  5507.  
  5508.      GET_KEY
  5509.  
  5510. TEMPLATE
  5511.  
  5512.      aGadTxts aHdrTxt GET_KEY iRetVal
  5513.  
  5514. PARAMETERS
  5515.  
  5516.      aGadTxts - string defining gadgets to be created. Gadget texts are
  5517.                 separated by the character "I".
  5518.  
  5519.      aHdrTxt  - Headline string for the requester.
  5520.  
  5521. RETURN
  5522.  
  5523.                             - REFERENCE 3.68 -
  5524.  
  5525.      iRetVal  - integer corresponding the selected gadget.
  5526.  
  5527. The value corresponding the first (leftmost) gadget is 1 and the return
  5528. value corresponding the rightmost gadget is 0 (cancel/negative choice
  5529. should always be the rightmost one as suggested by the Amiga Style Guide).
  5530. Intermediate gadgets/return values are incremented by one from left to
  5531. right.
  5532.  
  5533. DESCRIPTION
  5534.  
  5535. Opens a requester with a given header text and gadgets, waiting the user
  5536. to select one of them. The function returns a value corresponding the
  5537. selected gadget.
  5538.  
  5539. EXAMPLE
  5540.  
  5541.      "FIRSTlSECONDlTHIRDlCANCEL"
  5542.      "Select One of These" GET_KEY.
  5543.  
  5544. WORD
  5545.  
  5546.      GET_FLT
  5547.  
  5548. TEMPLATE
  5549.  
  5550.      aFIt aHdr GET_FLT iRetVal
  5551.  
  5552. PARAMETERS
  5553.  
  5554.      aFIt - pointer to a floating point
  5555.      aHdr - headline text string for the requester
  5556.  
  5557. RETURN
  5558.  
  5559.      iRetVal - TRUE of FALSE depending on the user's action
  5560.  
  5561. EXAMPLE
  5562.  
  5563. Opens a requester allowing the user to define a floating point value.
  5564. Formula evaluation is supported.
  5565.  
  5566. EXAMPLE
  5567.  
  5568.      ( define float variable )
  5569.      FVARIABLE MyFIt
  5570.  
  5571.      : MyTest
  5572.       3.14 MyFlt F!
  5573.       MyFlt "Define Angle" GET_FLT
  5574.       IF
  5575.         MyFlt F@ F.
  5576.       ENDIF
  5577.      ;
  5578.  
  5579. MyTest
  5580.  
  5581. WORD
  5582.  
  5583.      GET_STR
  5584.  
  5585. TEMPLATE
  5586.  
  5587.      aStr iLen aHdr GET_STR iRet
  5588.  
  5589. PARAMETERS
  5590.  
  5591.      aStr - a pointer to a buffer
  5592.      iLen - the maximum lenght of the string (lenght of the buffer - 1 )
  5593.      aHdr - a header text for the requester
  5594.  
  5595. RETURN
  5596.  
  5597.      iRet - 1 or 0 depending on the user's choice.
  5598.  
  5599. DESCRIPTION
  5600.  
  5601. Opens a requester allowing the user to define a string.
  5602.  
  5603.                             - REFERENCE 3.69 -
  5604.  
  5605. EXAMPLE
  5606.  
  5607.      ( create an object with custom name )
  5608.  
  5609.      "creation.rpl" LOAD
  5610.  
  5611.      16 STRING ObjNam
  5612.  
  5613.      : MyTest
  5614.       "Noname" ObjNam CPY
  5615.       ObjNam 16 "Create Object" GET_STR
  5616.       IF
  5617.         wOT_OR ObjNam 0 "CEND"
  5618.           C_LEVEL DROP
  5619.       ENDIF
  5620.      ;
  5621.  
  5622. WORD
  5623.  
  5624.      GET_VECT
  5625.  
  5626. TEMPLATE
  5627.  
  5628.      aVct aHdr GET_VECT iRet
  5629.  
  5630. PARAMETER
  5631.  
  5632. aVct - pointer to a vector (an array of 3 floating points)
  5633. aHdr - a header text for the requester
  5634.  
  5635. RETURN
  5636.  
  5637. iRet - TRUE or FALSE depending on the user's choice.
  5638.  
  5639. DESCRIPTION
  5640.  
  5641. Opens a requester allowing the user to define three floating point values,
  5642. in other words a 3D vector. Formula evaluation is supported.
  5643.  
  5644. EXAMPLE
  5645.  
  5646.      ( move selected objects )
  5647.  
  5648.      "vectors.rpl" LOAD
  5649.  
  5650.      VVARIABLE vDelta
  5651.  
  5652.      : MyTest
  5653.       0.0 1.0 3.1 vDelta V!
  5654.       vDelta "Move Selected Objects" GET_VECT
  5655.       IF
  5656.         O_GETSEL
  5657.         vDelta F@ 0 M_MOVE
  5658.       ENDIF
  5659.      ;
  5660.  
  5661. WORD
  5662.  
  5663.      GET_FILE
  5664.  
  5665. TEMPLATE
  5666.  
  5667.      iType aNam aDir aHdr GET_FILE iRet
  5668.  
  5669. PARAMETER
  5670.  
  5671.      iType - One of the follwing action qualifiers:
  5672.      iIO_READ - Selection is used for reading
  5673.      iIO_WRITE - Selection is used for writing
  5674.      iIO_DIR - Selection is used for defining a path
  5675.  
  5676.      aNam - pointer to an initial file name/result string
  5677.      aDir - pointer to an initial directory path
  5678.      aHdr - a header text for the requester
  5679.  
  5680. RETURN
  5681.  
  5682.      iRet - TRUE or FALSE depending on the user's choice.
  5683.  
  5684.                             - REFERENCE 3.70 -
  5685.  
  5686. DESCRIPTION
  5687.  
  5688. Opens a file requester on a given DOS drawer (directory) allowing the user
  5689. to select a file name. If the user moves in the hierarchy, the contents of
  5690. the buffer pointed by "iDir" is updated accordingly. If the user selects
  5691. OK, the buffer pointed by "iNam" will contain the complete file name
  5692. (including the path).
  5693.  
  5694. Note:
  5695. That both buffers should be large enough to hold the result strings.
  5696.  
  5697. EXAMPLE
  5698.  
  5699.      ( load a Real 3D IFF file )
  5700.  
  5701.      "io.rpl" LOAD
  5702.  
  5703.      256 STRING Name
  5704.      256 STRING Path
  5705.  
  5706.      : MyLoad
  5707.       "myfile"         Name CPY
  5708.       "r3d2:projects"  Path CPY
  5709.  
  5710.         iIO_READ Name Path "Load something"
  5711.                                 GET_FILE
  5712.         IF ( replace all sections: )
  5713.           Name IIO_RALL IIO_RALL FIL_LOAD
  5714.       ENDIF
  5715.      ;
  5716.  
  5717.      MyLoad
  5718.  
  5719. 3.10 WORDS
  5720.  
  5721. WORD
  5722.  
  5723.      RX
  5724.  
  5725. TEMPLATE
  5726.  
  5727.      sPrg RX
  5728.  
  5729. PARAMETER
  5730.  
  5731.      sPrg - string defining the arexx program to be executed
  5732.  
  5733. DESCRIPTION
  5734.  
  5735. This word sends a given ARexx program to the ARexx manager process as if
  5736. it was typed in from an Amiga DOS shell using the rx command.
  5737.  
  5738. Note:
  5739. That if the RX word does not return 0, it is not automatically interpreted
  5740. as an error situation. The reason for this is that some applications use
  5741. the return value for indicating something else than an error.
  5742.  
  5743. EXAMPLE
  5744.  
  5745.      "ADDRESS COMMAND dir" RX
  5746.      "RENDER" RX
  5747.  
  5748. SEE ALSO
  5749.  
  5750.      RX_RC
  5751.  
  5752. WORD
  5753.  
  5754.      RX_RC
  5755.  
  5756. TEMPLATE
  5757.  
  5758.      RX_RC - aRetVal
  5759.  
  5760. RETURNS
  5761.  
  5762.      aRetVal - The address of the return value
  5763.  
  5764. DESCRIPTION
  5765.  
  5766. This word can be used for fetching the return value from a previously
  5767. executed RX word. RX_RC returns the address of an integer variable
  5768. containing the result.
  5769.  
  5770.                             - REFERENCE 3.71 -
  5771.  
  5772. EXAMPLE
  5773.  
  5774.      ( send ARexx command )
  5775.      "ADDRESS STANDALONE RENDER" RX
  5776.      RX_RC @ ( fetch return value )
  5777.  
  5778.      IF ( terminate the RPL program )
  5779.         "ERROR:Cannot Execute" ERROR
  5780.      ENDIF
  5781.  
  5782. Note:
  5783. Although the word returns the address of the return value, currently it
  5784. does not make sense to assign a return value to ARexx commands arriving to
  5785. Real 3D's ARexx port.
  5786.  
  5787. WORD
  5788.  
  5789.      RX_RESULT
  5790.  
  5791. TEMPLATE
  5792.  
  5793. RX_RESULT - aResStr
  5794.  
  5795. RETURNS
  5796.  
  5797.      aResStr - Address of the result string
  5798.  
  5799. DESCRIPTION
  5800.  
  5801. This word can be used for accessing the result string variable of Real 3D.
  5802. The word returns the address of the result string. RPL programs can read
  5803. this variable after each sent ARexx message in order to detect the
  5804. possible result strings returned by external applications. The word can
  5805. also be used for passing a result string to an external application who
  5806. have sent an ARexx message to the ARexx port of Real 3D.
  5807.  
  5808. Note:
  5809. That a result string is returned only if it is requested by the command
  5810. sender application. Furthermore, all commands do not return a result
  5811. string even if it is requested. If the ARexx command sent to Real 3D
  5812. fails, result string is NOT returned. In other words, the result string
  5813. is valid only if the return code indicates that no error occurred during
  5814. command processing.
  5815.  
  5816. EXAMPLE
  5817.  
  5818.      .... "RX ( send ARexx command )
  5819.      RX_RC @ ( fetch return value )
  5820.      IF
  5821.         "ERROR:Cannot Execute" ERROR
  5822.      ENDIF
  5823.      RX_RESULT PUTS ( process result string )
  5824.  
  5825. WORD
  5826.  
  5827.      RX_SETCLIP
  5828.  
  5829. TEMPLATE
  5830.  
  5831.      sName sValue RX_SETCLIP
  5832.  
  5833. PARAMETERS
  5834.  
  5835.      sName - Address of the name string
  5836.      sValue - Address of the value string
  5837.  
  5838. DESCRIPTION
  5839.  
  5840. This word can be used for putting new items to the Clip List or updating
  5841. existing ones. Each item in the Clip List consists of a pair of strings
  5842. defining a name and a value for the item. The Clip List can be used for
  5843. passing information between Real 3D and ARexx and is typically used
  5844. whenver two or more result strings are needed.
  5845.  
  5846. EXAMPLE
  5847.  
  5848.      "rad" "0.5" RX_SETCLIP
  5849.      "position", "0.5, 0.8, 0.0" RX_SETCLIP
  5850.  
  5851.                             - REFERENCE 3.72 -
  5852.  
  5853. 3.11 VECTOR OPERATIONS
  5854.  
  5855. These words are defined in the file "vectors.rpl".
  5856.  
  5857. WORD
  5858.  
  5859.      VVARIABLE
  5860.  
  5861. TEMPLATE
  5862.  
  5863.      VVARIABLE name
  5864.  
  5865. DESCRIPTION
  5866.  
  5867. Defines a vector variable. The name of the variable must follow the word
  5868. VVARIABLE. The variable is initialized as 0 0 0.
  5869.  
  5870. A vector variable is an array of three floating point variables. When the
  5871. variable is later referenced by entering its name, the address of the
  5872. first floating point is pushed onto the stack.
  5873.  
  5874. EXAMPLE
  5875.  
  5876.      VVARIABLE myVector
  5877.  
  5878. SEE ALSO
  5879.  
  5880.      v@ V!
  5881.  
  5882. WORD
  5883.  
  5884.      V!
  5885.  
  5886. TEMPLATE
  5887.  
  5888.      fX fY fZ aVariable V!
  5889.  
  5890. PARAMETERS
  5891.  
  5892.      fX fY fZ - three values defining a vector
  5893.      aVariable - an address of the vector variable
  5894.  
  5895. DESCRIPTION
  5896.  
  5897. Store a vector in a variable.
  5898.  
  5899. EXAMPLE
  5900.  
  5901.      VVARIABLE myVar
  5902.  
  5903.      0 0 1.5 myVar V!
  5904.  
  5905. WORD
  5906.  
  5907.      v@
  5908.  
  5909. TEMPLATE
  5910.  
  5911.      aVariable v@ fX fY fZ
  5912.  
  5913. PARAMETERS
  5914.  
  5915.      aVariable - the address of a vector variable
  5916.  
  5917. RETURNS
  5918.  
  5919.      fX fY fZ - contents of the variable
  5920.  
  5921. DESCRIPTION
  5922.  
  5923. Fetch a vector from a given address.
  5924.  
  5925. EXAMPLE
  5926.  
  5927.      ( print the value of vMyVar )
  5928.      vMyVar F@ V.
  5929.  
  5930. WORD
  5931.  
  5932.      VADD
  5933.  
  5934. TEMPLATE
  5935.  
  5936.      v1 v2 VADD vRes
  5937.  
  5938. PARAMETERS
  5939.  
  5940.      v1 v2 - two vectors to be added
  5941.  
  5942. RETURNS
  5943.  
  5944.      vRes - result vector
  5945.  
  5946.                             - REFERENCE 3.73 -
  5947.  
  5948. DESCRIPTION
  5949.  
  5950. Vector addition. Pulls two vectors off the stack and pushes the result
  5951. vector back.
  5952.  
  5953. EXAMPLE
  5954.  
  5955.      VVARIABLE v1 VVARIABLE v2 VVARIABLE vRes
  5956.  
  5957.      1 0 0 v1 V! ( v1 = 1 0 0 )
  5958.      0 1 0 v2 V! ( v2 = 0 1 0 )
  5959.      v1 V@ v2 V@ VADD vRes V! ( vRes = v1 + v2 )
  5960.  
  5961. WORD
  5962.  
  5963.      VSUB
  5964.  
  5965. TEMPLATE
  5966.  
  5967.      v1 v2 VSUB vRes
  5968.  
  5969. PARAMETERS
  5970.  
  5971.      v1 , v2 - vectors to be subtracted
  5972.  
  5973. RESULT
  5974.  
  5975.      vRes - result
  5976.  
  5977. DESCRIPTION
  5978.  
  5979. Pulls two vectors off the stack, subtracts them and pushes the result back
  5980. onto the stack.
  5981.  
  5982. EXAMPLE
  5983.  
  5984.      10 5.0 0.5 ( v1 )
  5985.      5  5.0 0.5 ( v2 )
  5986.      VSUB
  5987.      V.
  5988.  
  5989. WORD
  5990.  
  5991.      VMUL
  5992.  
  5993. TEMPLATE
  5994.  
  5995.      v f VMUL vRes
  5996.  
  5997. PARAMETERS
  5998.  
  5999.      v - a vector to be multiplied
  6000.      f - a scalar value
  6001.  
  6002. RESULT
  6003.  
  6004.      vRes = v1 * f
  6005.  
  6006. DESCRIPTION
  6007.  
  6008. Multiplies a vector by a scalar. In other words, each component of the
  6009. given vector "v" is multiplied by the given float "f" and the result is
  6010. pushed onto the stack.
  6011.  
  6012. EXAMPLE
  6013.  
  6014.      ( duplicate the length of a vector )
  6015.      1.5 3.1 8.2 2.0 VMUL V.
  6016.  
  6017. WORD
  6018.  
  6019.      VDOT
  6020.  
  6021. TEMPLATE
  6022.  
  6023.      v1 v2 VDOT fRes
  6024.  
  6025. PARAMETERS
  6026.  
  6027.      v1, v2 - two vectors to be operated
  6028.  
  6029. RESULT
  6030.  
  6031.      fRes - Dot product of given vectors
  6032.  
  6033.                             - REFERENCE 3.74 -
  6034.  
  6035. DESCRIPTION
  6036.  
  6037. Pulls two vectors off the stack, executes dot product and pushes the
  6038. result (a floating point value) back onto the stack.
  6039.  
  6040. EXAMPLE
  6041.  
  6042.      ( dot product of perpendicular vectors = 0 )
  6043.      1 0 0 0 1 0 VDOT F.
  6044.  
  6045. WORD
  6046.  
  6047.      VCROS
  6048.  
  6049. TEMPLATE
  6050.  
  6051.      v1 v2 VCROS vRes
  6052.  
  6053. PARAMETERS
  6054.  
  6055.      v1, v2 - two vectors
  6056.  
  6057. RESULT
  6058.  
  6059.      vRes - result vector
  6060.  
  6061. DESCRIPTION
  6062.  
  6063. Cross product. The result vector is always perpendicular to the operands
  6064. v1 and v2.
  6065.  
  6066. EXAMPLE
  6067.  
  6068.      1 0 0 0 1 0 VCROS V. ( result = 0 0 1 )
  6069.  
  6070. WORD
  6071.  
  6072.      VNORM
  6073.  
  6074. TEMPLATE
  6075.  
  6076.      v VNORM vRes
  6077.  
  6078. PARAMETERS
  6079.  
  6080.      v - vector to be normalized
  6081.  
  6082. RESULT
  6083.  
  6084.      vRes - unit vector
  6085.  
  6086. DESCRIPTION
  6087.  
  6088. Vector normalization. The given vector is divided by its length and the
  6089. result is pushed back on to the stack. The lenght of the result vector is
  6090. always 1.
  6091.  
  6092. EXAMPLE
  6093.  
  6094.      120.2 10.2 -2.1 VNORM
  6095.  
  6096. WORD
  6097.  
  6098.      VLEN
  6099.  
  6100. TEMPLATE
  6101.  
  6102.      v VCROS fLen
  6103.  
  6104. PARAMETERS
  6105.  
  6106.      v - any vector
  6107.  
  6108. RESULT
  6109.  
  6110.      fLen - the length of "v"
  6111.  
  6112. DESCRIPTION
  6113.  
  6114. Pulls the given vector off the stack and puts the length of it back to
  6115. the stack.
  6116.  
  6117. EXAMPLE
  6118.  
  6119.      10 20 30 VLEN F.
  6120.  
  6121.                             - REFERENCE 3.75 -
  6122.  
  6123. WORD
  6124.  
  6125.      V.
  6126.  
  6127. TEMPLATE
  6128.  
  6129.      v V.
  6130.  
  6131. PARAMETERS
  6132.  
  6133.      v - vector
  6134.  
  6135. DESCRIPTION
  6136.  
  6137. Pulls a vector ( three float values ) off the stack and prints them out.
  6138.  
  6139. WORD
  6140.  
  6141.      VCONSTANT
  6142.  
  6143. TEMPLATE
  6144.  
  6145.      VCONSTANT name
  6146.  
  6147. DESCRIPTION
  6148.  
  6149.      Defines a vector constant.
  6150.  
  6151. EXAMPLE
  6152.  
  6153.      ( some useful constants )
  6154.      1 0 0 VCONSTANT vX
  6155.      0 1 0 VCONSTANT vY
  6156.      0 0 1 VCONSTANT vZ
  6157.  
  6158.      vX V.
  6159.  
  6160.                             - REFERENCE 3.76 -
  6161.  
  6162. Chapter 4 GEOMETRIC OBJECT PROPERTIES
  6163. -------------------------------------
  6164.  
  6165. 4.1 GEOMETRIC PROPERTIES
  6166.  
  6167. 4.1.1 Surface Definition
  6168.  
  6169. The vectors and points of the data structure of each visible describe the
  6170. mathematical surfaces that form the basis for the final visible surfaces
  6171. that are produced by rendering. The surface definition can be modified by
  6172. the various modification functions and boolean operations. How the data
  6173. structure describes each surface of a visible is given in the following
  6174. figures and text.
  6175.  
  6176. 4.1.2 COG
  6177.  
  6178. The center of gravity of each primitive occupies one vector. The tag MCOG
  6179. can be used for overriding the default value.
  6180.  
  6181. 4.1.3 Direction
  6182.  
  6183. This property is defined by two vectors perpendicular to each other. The
  6184. tags DDIR and DDIV can be used to redefine the defaults. The property
  6185. describes the local obJect space coordinate system.
  6186.  
  6187. 4.1.4 Size
  6188.  
  6189. One floating-point value is used to define the size of each object. This
  6190. represents the radius of a spherical volume that can contain the entire
  6191. object. For a level, this bounding sphere encloses its sub-obJects. The
  6192. default can be overridden with the FSIZ tag.
  6193.  
  6194. For more information about tags see the reference chapter 5.
  6195.  
  6196. 4.2 DEFAULT GEOMETRIC PROPERTIES
  6197.  
  6198. The following text and diagrams describe the default geometric properties
  6199. for each primitive and how the data structure relates to the surface
  6200. definition.
  6201.  
  6202. All the calculations shown involve vector arithmetic, and the following
  6203. symbols are used:
  6204.  
  6205. ASC     - Absolute Spatial Coordinate
  6206. ptn     - Point on a line
  6207. pt[u,v] - Point from a mesh
  6208. vn      - Vertex of a geometric solid
  6209.  
  6210. The other symbols relate to the data structure of the primitive.
  6211.  
  6212. PRIMITIVE : aimpoint, offset
  6213. COG       : position
  6214. DIR       : ASC z
  6215. DIV       : ASC x
  6216.  
  6217. Figure r4-1: (PICTURE: R4-1)
  6218.  
  6219. PRIMITIVE : cone COG: 0.3*center + 0.7*(intersection of the axis and the
  6220.             bounding plane)
  6221. DIR       : axis
  6222. DIV       : a
  6223.  
  6224. PRIMITIVE : coordsys
  6225. COG       : origin
  6226. DIR       : z
  6227. DIV       : x
  6228.  
  6229.                              - REFERENCE 4.1 -
  6230.  
  6231. Figure r4-2: (PICTURE: R4-2)
  6232.  
  6233. PRIMITIVE : cube
  6234. COG       : average of vertices
  6235. DIR       : dvect
  6236. DIV       : v1 - v0
  6237.  
  6238. Figure r4-3: (PICTURE: R4-3)
  6239.  
  6240. PRIMITIVE : cut-cone, cylinder, ellipse-segment, hyperboloid
  6241. COG       : average of p1 & p2
  6242. DIR       : axis
  6243. DIV       : a
  6244.  
  6245. Figure r4-4: (PICTURE: R4-4)
  6246.  
  6247. PRIMITIVE : cut-polymid
  6248. COG       : average of vertices
  6249. DIR       : vector between polygonal surface centers
  6250. DIV       : v1 - v0
  6251.  
  6252. Figure r4-5: (PICTURE: R4-5)
  6253.  
  6254. PRIMITIVE : cut-pyramid
  6255. COG       : average of vertices
  6256. DIR       : vector between the rectangular surface centers
  6257. DIV       : v1 - v0
  6258.  
  6259.                              - REFERENCE 4.2 -
  6260.  
  6261. Figure r4-6: (PICTURE: R4-6)
  6262.  
  6263. PRIMITIVE : ellipse
  6264. COG       : center
  6265. DIR       : dvect
  6266. DIV       : a
  6267.  
  6268. Figure r4-7: (PICTURE: R4-7)
  6269.  
  6270. PRIMITIVE : ellipsoid
  6271. COG       : center
  6272. DIR       : axis
  6273. DIV       : a
  6274.  
  6275. PRIMITIVE : group
  6276. COG       : average of indexed points
  6277. DIR       : vector between 1 st & 2nd indexed points
  6278. DIV       : ILL-DEFINED
  6279.  
  6280. PRIMITIVE : level
  6281. COG       : average of all sub-obJect COGs unless empty
  6282. DIR       : DIR of 1 st sub-obJect unless empty
  6283. DIV       : DIV .. .. .. .. .. ..
  6284.  
  6285. Figure r4-8: (PICTURE: R4-8)
  6286.  
  6287. PRIMITIVE : line
  6288. COG       : pt0
  6289. DIR       : pt1 - pt0
  6290. DIV       : ILL-DEFINED
  6291.  
  6292. PRIMITIVE : link
  6293. COG       : fetched from target
  6294. DIR       : .. .. ..
  6295. DIV       : .. .. ..
  6296.  
  6297. Figure r4-9: (PICTURE: R4-9)
  6298.  
  6299. PRIMITIVE : mesh
  6300. COG       : average of all points
  6301. DIR       : (pt[1 ,0] - pt[0,0]) x (pt[0, 1] - pt[0,0])
  6302. DIV       : pt[1 ,0] - pt[0,0]
  6303. Note      : x - vector cross product
  6304.  
  6305.                              - REFERENCE 4.3 -
  6306.  
  6307. Figure r4-10: (PICTURE: R4-10)
  6308.  
  6309. PRIMITIVE : polygon
  6310. COG       : average of vertices
  6311. DIR       : dvect
  6312. DIV       : v1 - v0
  6313.  
  6314. Figure r4-11: (PICTURE: R4-11)
  6315.  
  6316. PRIMITIVE : polyhedron
  6317. COG       : aver age of vertices
  6318. DIR       : dvect
  6319. DIV       : v1 - v0
  6320.  
  6321. Figure r4-12: (PICTURE: R4-12)
  6322.  
  6323. PRIMITIVE : polymid
  6324. COG       : average of vertices and apex
  6325. DIR       : vector between base-center and apex
  6326. DIV       : v1 - v0
  6327.  
  6328. Figure r4-13: (PICTURE: R4-13)
  6329.  
  6330. PRIMITIVE : pyramid
  6331. COG       : 0.3*apex + 0.7*base-center
  6332. DIR       : vector between base-center and apex
  6333. DIV       : v1 - v0
  6334.  
  6335.                              - REFERENCE 4.4 -
  6336.  
  6337. Figure r4-14: (PICTURE: R4-14)
  6338.  
  6339. PRIMITIVE : rectangle
  6340. COG       : average of vertices
  6341. DIR       : dvect
  6342. DIV       : v1 - v0
  6343.  
  6344. PRIMITIVE : triset
  6345. COG       : average of all points
  6346. DIR       : direction of 1 st face
  6347. DIV       : direction of 2nd face
  6348.  
  6349. Figure r4-15: (PICTURE: R4-15)
  6350.  
  6351. PRIMITIVE : viewpoint
  6352. COG       : average of left & right
  6353. DIR       : dvect (initialized to the direction of the current aimpoint)
  6354. DIV       : right - left
  6355.  
  6356.                              - REFERENCE 4.5 -
  6357.  
  6358. Chapter 5 TAGS
  6359. --------------
  6360.  
  6361. TAGs are used for expanding the object and the material data structures.
  6362. They contain alternatives to assumed default values or additional
  6363. information to describe some additional property for the object. These
  6364. additional properties are often needed when creating new animation
  6365. techniques (methods) and procedural materials.
  6366.  
  6367. Internally a tag consists of two parts: the tag ID (tag identifier), and
  6368. the tag field, which points to the actual tag values unless it is an
  6369. integer (lxxx) tag, in which case the tag field is the actual tag value.
  6370. From the user perspective, a tag consists of the tag ID and the tag value,
  6371. unless RPL is being used; then it is necessary to access the tag values
  6372. via the tag field.
  6373.  
  6374. The user can utilize his/her own tags by creating a function that looks
  6375. for a particular tag ID and then acts upon or modifies its values.
  6376. This function takes the form of an RPL word definition which is then
  6377. invoked either by executing it directly, executing it via the user
  6378. interface (a macro or a tool icon), or by attaching it to a method as a
  6379. method procedure.
  6380.  
  6381. Tags provide the final degree of customization necessary to expand the
  6382. features of REAL 3D For example:
  6383.  
  6384. IAGE 32
  6385.  
  6386. SNAM John Houston
  6387.  
  6388. FLEN 182.5
  6389.  
  6390. VPOS 1.5 1.2 0.5 
  6391.  
  6392. 5.1 Tag identifiers
  6393.  
  6394. The tag ID consists of four ASCII characters and its structure is
  6395. generally Txxx, where:
  6396.  
  6397. - T describes the type of the tag value
  6398.  
  6399. - xxx is the identifier used for recognizing individual tags.
  6400.  
  6401. There are two basic kinds of tags:
  6402.  
  6403. 1. Tags affected by Real 3D modify functions. When user modifies the
  6404.    object to which the tag is attached, the tag value is modified as well.
  6405.    There are two sub-classes of modifiable tags: "M" and "D".
  6406.  
  6407. 2. Tags which are not affected by the modify functions.
  6408.  
  6409. Tag type characters can be one of the following:
  6410.  
  6411. C - Control tag, used only internally.
  6412.  
  6413. F - Floating-point tag. The tag field is a pointer to an actual
  6414.     floating-point tag value.
  6415.  
  6416. I - Integer tag, the tag field is used directly to store the value.
  6417.  
  6418. S - String tag, the tag field points to a string which is the tag value.
  6419.  
  6420. V - Vector tag, the tag field is a pointer to an array of three
  6421.     floating-points.
  6422.  
  6423. M - Modifiable vector tag. Modified as absolute 3D point by REAL 3D
  6424.     modify functions.
  6425.  
  6426. D - Modifiable vector tag. Modified as a vector, so modify functions such
  6427.     as rotate and mirror affects this tag, but the move function has no
  6428.     effect at all.
  6429.  
  6430.                              - REFERENCE 5.1 -
  6431.  
  6432. 5.2 Reserved tag identifiers
  6433.  
  6434. The following are the tag ID's reserved for use internally by REAL 3D:
  6435.  
  6436. CEND - This ends the tag data structure. It does not appear on the tag
  6437.        requesters.
  6438.  
  6439. DDIR - Primary direction vector for object. For example:
  6440.        "DDIR 1.0 0.0 0.0"
  6441.  
  6442. DDIV - Secondary direction vector for object. For example:
  6443.        "DDIV 0.0 -1.0 0.0"
  6444.  
  6445. DDIR defines obJect "axis" and DDIV defines how object is rotated around
  6446. this axis. These tags are used where exactly defined direction for objects
  6447. is needed and they override the default object direction. These tags do
  6448. not have to be defined as perpendicular to each other as they are
  6449. "normalized" internally so that DDIV is always perpendicular to DDIR.
  6450.  
  6451. MCOG - Center of Gravity. This tag can be used for overriding the default
  6452.        center of gravity. For example: "MGOG 1.0 1.0 0.5"
  6453.  
  6454. SCRE - Formula producing logical result to control target creation by
  6455.        CREATION method; the result should be assigned to the "I" variable.
  6456.        For example: "l=(t> 1 .0)"
  6457.  
  6458. SDEL - Logical formula to control target deletion by CREATION method.
  6459.        For example: "l=(y> 1.0)"
  6460.  
  6461. SMAT - This tag is used for defining materials associated with objects.
  6462.        All mapping primitives contain this tag. The tag value contains
  6463.        the name of the material. For example: "SMAT wood1".
  6464.  
  6465. Note:
  6466. That if the name of any material is changed, then the tag value for SMAT
  6467. should also be changed to reflect the new material name.
  6468.  
  6469. SMTH - The name of the method associated with object. For example:
  6470.        "SMTH SIMPLE SKELETON".
  6471.  
  6472. SOBJ - Reference to another obJect. Links and groups refer to other
  6473.        objects and the information about the target object is stored using
  6474.        this tag. The tag value contains the full name of the target object
  6475.        including the path (for example: /Root/myobj/mesh). The path can be
  6476.        absolute or relative.
  6477.  
  6478. SRPL - The contents of this tag can be any RPL program. The purpose of it
  6479.        depends on the obJect it is attached to. When associated with
  6480.        method or parameter object, the tag can be used for customizing
  6481.        built-in methods and evaluable parameter objects (see SFOR). The
  6482.        tag is also used for attaching RPL procedures to objects allowing
  6483.        user to create intelligent "thinking" objects. For example: "SRPL
  6484.        MyMethod".
  6485.  
  6486. VFRQ - How much faster (or slower) a method's time runs compared to its
  6487.        parent time. For example "VFRQ 3.0 0.0 0.0".
  6488.  
  6489. VOFF - Offset vector used by methods. For example "VOFF 0.5 0.5 0.5".
  6490.  
  6491.  
  6492. VPHS - General usage phase tag. The tag can be used for modifying a
  6493.        method's local time. When associated with target objects, the
  6494.        purpose of the tag depends on the method in question. For example
  6495.        "VPHS 0.2 0 0".
  6496.  
  6497. VTIE - Time end tag. When the time reaches this value, the method stops.
  6498.        For example: "VTIE 0.8".
  6499.  
  6500. VTIM - This tag is used for defining a method's current time, i.e. the
  6501.        time that the method's current state corresponds to. For example:
  6502.        "VTIM 0.5".
  6503.  
  6504.                              - REFERENCE 5.2 -
  6505.  
  6506. VTIS - Used for defining a sub-range from parent time. When the current
  6507.        time reaches this value, the method is activated. For example:
  6508.        "VTIS 0.1".
  6509.  
  6510. FFRI - Surface friction between particles involved in collisions. This
  6511.        causes changes to velocity and spin. For example: "FFRI 0.5".
  6512.  
  6513. FMAS - Mass for obJect. If this tag is absent the default mass for the
  6514.        object is 100.0 kg. For example: "FMAS 10000.0".
  6515.  
  6516. FREB - Rebound energy for collision detection system. With this tag it is
  6517.        possible to specify the "elasticity" of collisions with the object
  6518.        having this tag. The default value is 1.0 (fully elastic); the
  6519.        value 0 results to fully non-elastic behaviour. For example:
  6520.        "FREB 0.8".
  6521.  
  6522. FSIZ - Size for particle. This tag can be used for overriding the default
  6523.        object size. The collision detection system uses the size property
  6524.        to define when distance between objects is small enough for surface
  6525.        collision detection. The size is also needed by the FRICTION method
  6526.        (the bigger the object, the higher the friction force). For
  6527.        example: "FSIZ 2.3".
  6528.  
  6529. ICSM - Collision sampling accuracy used by COLLISION and INT COLLISION
  6530.        methods. The default value 0 gives normal accuracy, the other
  6531.        possible values 1 and 2 give increased accuracy. For example:
  6532.        "ICSM 1".
  6533.  
  6534. SFOR - String tag used for defining formulas. The contents of this tag is
  6535.        always evaluated when associated with method and parameter objects.
  6536.        Some methods also allow this tag to be associated with target
  6537.        objects. For example: "SFOR if(x<0, f=f*2, f=0)".
  6538.  
  6539. VSPI - Spin for particle methods. Value defines angular velocity around
  6540.        direction axes in radians. The tag value can also be negative to
  6541.        reverse the direction of rotation. For example: "VSPI 3.14 6.28
  6542.        -0.5".
  6543.  
  6544. VVEL - Velocity of particles used by particle methods. For example:
  6545.        "VVEL 10.0 5.0 0.0".
  6546.  
  6547. SIDE - Unique identifier used for linking group and link primitives with
  6548.        their targets. If the object referred by a SOBJ tag cannot be
  6549.        found, then the target is resolved using this tag.
  6550.  
  6551. SWND - Window name. Can be added to viewpoint and aimpoint primitives to
  6552.        identify the window whose camera orientation they specify.
  6553.  
  6554.                              - REFERENCE 5.3 -
  6555.  
  6556. Chapter 6 AREXX INTERFACE OF REAL 3D
  6557. ------------------------------------
  6558.  
  6559. 6.1 General
  6560.  
  6561. ARexx is undoubtedly one of those things which make the Amiga platform
  6562. something special. ARexx provides applications with a common communication
  6563. protocol, this kind of versatility is difficult to find on other
  6564. platforms. ARexx has quickly become a standard supported almost by all
  6565. commercial products and REAL 3D is not an exception.
  6566.  
  6567. Basically REAL 3D contains a so called "active" ARexx port, similar to
  6568. many other programs. In other words, REAL 3D can send and receive ARexx
  6569. commands. However, the way how the ARexx interface of REAL 3D is
  6570. implemented, is somewhat unique.
  6571.  
  6572. In REAL 3D there is no fixed set of supported ARexx commands. Instead,
  6573. commands arriving at REAL 3D are passed directly to the parser of REAL
  6574. 3D'S built in programming language - RPL.
  6575.  
  6576. 6.2 ARexx vs. RPL
  6577.  
  6578. REAL 3D uses RPL extensively. For example, it is used as a macro recording
  6579. language, as a scene description method, procedural textures and
  6580. animations are described using it, key and icon bindings are defined using
  6581. RPL, user defined custom formulas describing mathematical textures are
  6582. evaluated using RPL etc. Because of the time critical nature of some of
  6583. these tasks, RPL was designed to be fast in its execution. This led to
  6584. quite a low level "compiled" language.
  6585.  
  6586. ARexx is based on the REXX programming language and is an "interpreted"
  6587. language. Because of this, it is slower in its execution and cannot be
  6588. used for implementing time critical tasks like procedural textures.
  6589. However, the strongest point of ARexx is that it can be used for
  6590. integrating different applications with each other. It is important to
  6591. realize that RPL and ARexx are not two different "competitive" programming
  6592. language implementations for REAL 3D. ARexx interface of REAL 3D is more
  6593. than just set of ARexx commands; it is actually another programming
  6594. language. Together, ARexx and RPL provide the user with a great deal of
  6595. power and flexibility due to the fact that both ARexx and RPL are
  6596. "interactive" languages, they fit perfectly together.
  6597.  
  6598. This kind of ARexx interface has many advantages. One of the biggest is
  6599. that the interface is not fixed; the user can expand it simply by
  6600. programming new RPL words. In other words, the ARexx interface of REAL 3D
  6601. is not "hard coded" to the program. Another advantage is that you can use
  6602. RPL for those tasks that better suit RPL and ARexx for those tasks where
  6603. ARexx appears to be a more natural choice. Thanks to the clever
  6604. implementation of ARexx, you can mix RPL and ARexx programs without any
  6605. problems.
  6606.  
  6607. You don't have to know much about RPL in order to use the ARexx interface
  6608. of REAL 3D. You can call existing RPL words as if they were commands
  6609. implemented Just for the ARexx interface. However, no programming language
  6610. contains all possible functions for all possible tasks. There are always
  6611. cases where some new useful functions could help and speed up the Job.
  6612. Therefore, a system where the ARexx interface is not fixed and can be
  6613. quickly extended can turn out to be an extremely valuable feature.
  6614.  
  6615. We could say that all the power provided by RPL can also be achieved
  6616. through ARexx programs and vice versa. The interface is established using
  6617. a set of RPL words which can be used for sending ARexx commands to other
  6618. applications, for passing results back to them, accessing the ARexx Clip
  6619. List and so on. In the following sections we will show you how to use the
  6620. ARexx interface of REAL 3D. However, this chapter is not ment to be a
  6621. tutorial for ARexx programming or the RPL programming language. For more
  6622. information about the ARexx programming, see your Amiga system software
  6623. manuals.
  6624.  
  6625.                              - REFERENCE 6.1 -
  6626.  
  6627. 6.3 Sending ARexx Commands to the ARexx Port of REAL 3D
  6628.  
  6629. The name of the REAL 3D ARexx port is REAL3D0. If there are more than one
  6630. REAL 3Ds running simultaneously, the postfix index is incremented by one
  6631. for each new instance so that it remains unique and can be used for
  6632. identifying all program instances if needed.
  6633.  
  6634.      rx "ADDRESS REAL3D0 RENDER"
  6635.  
  6636. When entered in an AmigaDOS shell window, this command line sends a RENDER
  6637. command to REAL 3D which causes REAL 3D to render all its windows.
  6638.  
  6639. A more common way to send ARexx commands to REAL 3D is to write an ARexx
  6640. program and save it to a file. This ARexx program can then be invoked from
  6641. the AmigaDOS shell or any application which supports ARexx.
  6642.  
  6643. For example, the following ARexx program can be saved as "ram:test.rexx"
  6644. and executed by entering the command "rx ram:test".
  6645.  
  6646. /* Render REAL 3D windows */
  6647. ADDRESS REAL3D0
  6648. RENDER
  6649.  
  6650. You can execute any REAL 3D menu function by using the MENU command. As
  6651. the RPL word descriptions specify, the RPL word MENU takes three
  6652. parameters where the first defines the menu title, the second defines menu
  6653. item and the last defines the submenu.
  6654.  
  6655. /* Activate the function Modify/Structure/Name */
  6656. ADDRESS REAL3D0 2 2 0 MENU
  6657.  
  6658. The MENU command allows you to execute REAL 3D functions using the highest
  6659. level interface. For example, the command:
  6660.  
  6661. /* play forwards */
  6662. ADDRESS REAL3D0 4 1 0 MENU
  6663.  
  6664. plays the animation to the end.
  6665.  
  6666. However, if you don't want to access functions at the highest level, you
  6667. have to consult the RPL reference chapter in order to find how to access
  6668. the desired function at a lower level. F or example, if you want to ask
  6669. REAL 3D to load the object file "r3d2:objects/myobj", you don't want to
  6670. use the highest level access to the ProJect/Objects/Load function (because
  6671. it opens the file requester asking the user to select the file name). In
  6672. this case the word FIL_LOAD can be used instead.
  6673.  
  6674. /* ask Real to load file r3d2:objects/myobj" */
  6675. ADDRESS REAL3D0
  6676. "r3d2:objects/myobj" lIO_RALL 0 FIL_LOAD
  6677.  
  6678. If you want to invoke the function Animate/Control/Goto so that REAL 3D
  6679. asks the user to define the moment in time where to play, you can use MENU
  6680. word. Another possibility is to use lower level access and use the PLAY
  6681. word. PLAY takes one parameter which defines the moment in time to which
  6682. the animation should be played:
  6683.  
  6684. /* play animation to half way */
  6685. ADDRESS REAL3D0
  6686. 0.5 PLAY
  6687.  
  6688. For more information about all possible RPL words (REAL 3D ARexx
  6689. commands), see the RPL reference chapter.
  6690.  
  6691. Because all arriving ARexx commands are passed directly to the RPL parser,
  6692. it is possible to mix ARexx and RPL freely. For example, the following
  6693. ARexx program produces a simple animation.
  6694.  
  6695. /* simple animation */
  6696. ADDRESS REAL3D0
  6697.  
  6698. do i = 1 to 10 /* ten frames */
  6699.      0 O_GETROOT /* objects to be moved */
  6700.      0.10 0 0 M_MOVE
  6701.                  /* move 0.1, 0 0 units */
  6702.      RENDER /* render the frame */
  6703. end
  6704.  
  6705. As mentioned earlier, the ARexx interface of REAL 3D can be expanded
  6706. simply by writing new RPL words. For example, the animation presented
  6707.  
  6708.                              - REFERENCE 6.2 -
  6709.  
  6710. in the previoUs example can be implemented by defining a following RPL
  6711. word in REAL 3D.
  6712.  
  6713. ( execute this as a macro from REAL 3D )
  6714. ( or insert it to s:rpl-startup )
  6715. : MOVE_&_RENDER
  6716.    0 0 GETROOT ( objects to be moved
  6717.    0.1 0 0 0 M_MOVE ( move 0.1 0 0 units
  6718.    RENDER ( render the frame
  6719. ;
  6720.  
  6721. Then it is possible to execute the following ARexx macro:
  6722.  
  6723. /* simple ARexx animation */
  6724. do i = 1 to 10 /* ten frames */
  6725.    MOVE_&_RENDER
  6726.        /* call the new RPL word */
  6727. end
  6728.  
  6729. In the previous examples, we used ARexx control structures for defining a
  6730. simple animation loop. However, the same animation can be created by using
  6731. the control structures of RPL. In other words, the RPL word can also
  6732. contain the loop definition.
  6733.  
  6734. Execute the following RPL program as a Macro from REAL 3D:
  6735.  
  6736. : ANIMATE
  6737.    10 0 DO
  6738.       ( call a word defined earlier )
  6739.       MOVE_&_RENDER
  6740.  LOOP
  6741. ;
  6742.  
  6743. Now send the following ARexx command to REAL 3D:
  6744.  
  6745.      rx "ADDRESS REAL3D0 ANIMATE"
  6746.  
  6747. and all obJects will be moved and rendered ten times.
  6748.  
  6749. The third way to create the same animation is to send a small RPL program
  6750. to REAL 3D which takes care of everything:
  6751.  
  6752. /* define a new RPL word through ARexx */
  6753. ADDRESS REAL3D0
  6754. ":ANIMALL 10 0 DO 0 O_GETROOT
  6755.   0.1 0 0 0 M_MOVE RENDER LOOP ;"
  6756.  
  6757. Then send the "ANIMALL" command to REAL 3D:
  6758.  
  6759.      rx "ADDRESS REAL3D0 ANIMALL"
  6760.  
  6761. Note that if the syntax of a RPL program is not accepted by the ARexx
  6762. interpreter, it must be quoted . When the ARexx sends the string to the
  6763. host application it removes double quotes making it a valid RPL program.
  6764.  
  6765. 6.4 Return Values
  6766.  
  6767. REAL 3D returns 0 if it succeeds in its task to execute an ARexx command.
  6768. Otherwise it returns a positive value. ARexx assigns this return value to
  6769. the variable "rc". You can use this variable to detect whether or not the
  6770. command succeeded.
  6771.  
  6772. /* return value testing example */
  6773. address REAL3D0
  6774.  
  6775. ZENDER /* send command to Real */
  6776. if(rc ~= 0) then do /* test return value */
  6777.    say "Cannot ZENDER"
  6778.    exit rc
  6779. end
  6780.  
  6781. Note that REAL 3D uses the return value only for indicating whether or not
  6782. the executed command succeeded. One of the most common errors is "syntax
  6783. error" in the RPL program; the ARexx program has sent a command or program
  6784. to REAL 3D which RPL cannot understand.
  6785.  
  6786. Because the return value is only used as an error indicator, the only way
  6787. to affect the return value is the RPL word ERROR. In other words, the
  6788. called RPL word can cause an error itself, making REAL 3D return an error
  6789. code to the ARexx program.
  6790.  
  6791.                              - REFERENCE 6.3 -
  6792.  
  6793. ( Define this RPL word in REAL 3D )
  6794. : MAKE_SURE
  6795.    "YESlNO" "Are You Sure" GET_KEY
  6796.    IF
  6797.      QUIT ( if "YES" selected, return 0 )
  6798.    ELSE ( otherwise cause error )
  6799.      0 ERROR ( without error message )
  6800.    ENDIF
  6801. ;
  6802.  
  6803. Now the new RPL word can be called from any ARexx program as follows:
  6804.  
  6805. /* test return value example */
  6806. address REAL3D0
  6807. MAKE_SURE
  6808. if(rc ~= 0) then do
  6809.      say "The user selected NO"
  6810.      exit rc
  6811. end
  6812. say "The user selected YES"
  6813.  
  6814. 6.5 Result String
  6815.  
  6816. When a simple "error/no error" return value is not enough, ARexx programs
  6817. can ask REAL 3D to return additional information about the executed
  6818. command. So called "result string" can be used for that purpose.
  6819.  
  6820. REAL 3D returns a result string only if it is requested by the ARexx
  6821. program and if Real successfully executed the command. Therefore you
  6822. always have to check the return value assigned to the variable "rc" before
  6823. accessing the result string.
  6824.  
  6825. You can request REAL 3D to pass a result string by using the ARexx
  6826. instruction OPTIONS RESULTS, and the RPL word RX RESULT can be used for
  6827. defining the result siring REAL 3D should return.
  6828.  
  6829. For instance, an ARexx program could ask REAL 3D to ask the name of the
  6830. user. This can be accomplished by defining the following word in REAL 3D:
  6831.  
  6832. ( Execute me as a macro )
  6833. : WHO_ARE_YOU
  6834.    ( put user's name to the result string )
  6835.    RX_RESULT 50 "Who Are You ?" GET_STR
  6836.  
  6837.    ( return error if user )
  6838.    ( cancelled the requester )
  6839.    NOT IF
  6840.      0 ERROR
  6841.    ENDIF
  6842. ;
  6843.  
  6844. The ARexx program sending WHO_ARE_YOU command to Real looks like the
  6845. following:
  6846.  
  6847. /* request result string */
  6848. options results
  6849.  
  6850. /* define host address */
  6851. address REAL3D0
  6852.  
  6853. /* send command to REAL 3D */
  6854. WHO_ARE_YOU
  6855.  
  6856. /* check return value and exit */
  6857. /* if the user selected cancel */
  6858. if(rc ~= 0) then do
  6859.      say "Unknown Person"
  6860.      exit rc
  6861. end
  6862.  
  6863. /* otherwise "result" variable contains */
  6864. /* the name of the user */
  6865. say result
  6866.  
  6867. Although ARexx allows you to mix RPL programs with ARexx programs (if
  6868. ARexx cannot recognize a part of the program, it assumes it to be an
  6869. external procedure call and sends it to the host application), a better
  6870. solution is to keep RPL programs and ARexx macros separated. This can be
  6871. implemented so that the ARexx macro asks REAL 3D to load the required RPL
  6872. programs in as the first thing. For example, the previous WHO_ARE_YOU
  6873. example could be implemented as follows:
  6874.  
  6875.                              - REFERENCE 6.4 -
  6876.  
  6877. /* ask Real to load whoareyou.rpl */
  6878. /* before calling word WHO_ARE_YOU */
  6879. ADDRESS REAL3D0
  6880. "ram:whoareyou.rpl" LOAD
  6881. WHO_ARE_YOU
  6882. if(rc ~= 0)then do
  6883.      say "Unknown Person"
  6884.      exit rc
  6885. end
  6886. say result
  6887.  
  6888. As you have propably already noticed, ARexx allows you to use apostrophes
  6889. (") for passing quoted strings to host applications. Whenever you have to
  6890. send a string to REAL 3D, you have to enclose it with apostrophes because
  6891. of the way ARexx translates them. ARexx translates
  6892.  
  6893. "/car/engine" 0_FIND
  6894.  
  6895. to
  6896.  
  6897. /car/engine O_FIND
  6898.  
  6899. which will cause a syntax error when sent to REAL 3D.
  6900.  
  6901. Another possiblity is to use a variable as follows:
  6902.  
  6903. objname = "/car/engine"
  6904.  
  6905. " II objname II " O_FIND
  6906.  
  6907. 6.6 Clip List
  6908.  
  6909. Multiple result strings can be passed to an ARexx program by using the
  6910. Clip List feature of the ARexx. The Clip List consists of pairs of strings
  6911. where each entry consists of a name and a value. REAL 3D can access the
  6912. Clip List using the word RX_SETCLIP and ARexx programs using the function
  6913. getclip() and setclip().
  6914.  
  6915. For example, REAL 3D can add one entry to the Clip List as follows:
  6916.  
  6917. "rad" "0.5" RX_SETCLIP
  6918.  
  6919. Then the Arexx program can read it as follows:
  6920.  
  6921. radius = getclip("rad")
  6922.  
  6923. Clip List is typically used whenever two or more result strings are
  6924. needed. For example, the ARexx program could ask REAL 3D to assign the
  6925. name of the current level and root objects to the clip list. The RPL
  6926. program would look like this:
  6927.  
  6928. ( save this program as ram:clexample.rpl )
  6929. : ASK_CURR_ROOT
  6930.      "root" ( Clip List item name )
  6931.      ( and address of the object name: )
  6932.      O_GETROOT O.sName +
  6933.      RX_SETCLIP
  6934.  
  6935.      "current"
  6936.      O_GETCURR O.sName
  6937.      RX_SETCLIP
  6938. ;
  6939.  
  6940. The actual ARexx macro asks REAL 3D to load clexample.rpl in and then
  6941. calls the word ASK_CURR_ROOT which causes Real to assign values to "root"
  6942. and "current items in the Clip List.
  6943.  
  6944. /* ARexx macro */
  6945. ADDRESS REAL3D0
  6946.  
  6947. /* ask Real to load clexample.rpl in */
  6948. "ram:clexample.rpl" LOAD
  6949.  
  6950. /* call the word defined in clexample */
  6951. ASK_CURR_ROOT
  6952. say getclip("root")
  6953. say getclip("current")
  6954.  
  6955. 6.7 Sending ARexx Commands from REAL 3D
  6956.  
  6957. As already mentioned, REAL 3D can send and receive ARexx commands. This
  6958. can be accomplished by using the RPL word RX. The RX word takes one
  6959. parameter, which is a string containing the ARexx program to be executed.
  6960.  
  6961.                              - REFERENCE 6.5 -
  6962.  
  6963. For example:
  6964.  
  6965. "ADDRESS COMMAND dir" RX
  6966.  
  6967. causes ARexx to send the "dir" command to the underlying AmigaDOS shell
  6968. when entered from any RPL window.
  6969.  
  6970. The command:
  6971.  
  6972. "RENDER" RX
  6973.  
  6974. causes all REAL 3D windows to be rendered as if the RENDER command was
  6975. received from the external application or typed in from any RPL window.
  6976.  
  6977. Note that ARexx allows you to use apostrophes (") for passing quoted
  6978. strings to host applications. In RPL, you can use use the backspace
  6979. character before the double quote character. This allows you to send
  6980. strings with double quotes to the ARexx master process.
  6981.  
  6982. For example:
  6983.  
  6984. "\"hello world\" PUTS" RX
  6985.  
  6986. does the same as the command
  6987.  
  6988. "hello world" PUTS
  6989.  
  6990. when typed in from a RPL window.
  6991.  
  6992. Lets consider the following scenario: the user is going to render an
  6993. animation which consists of 1000 frames. Because there is not enough disk
  6994. space for such a big animation, the only possibility is to render the
  6995. animation directly to video through a single frame recorder. Naturally the
  6996. software which controls the single frame recorder supports ARexx and can
  6997. therefore communicate with REAL 3D without any problems.
  6998. The "frame command" in the Animation window can be used for that purpose.
  6999. Lets assume that the user has written a ARexx macro which saves the
  7000. rendered imagefile to video. If the name of the ARexx program is
  7001. "save.rexx", then the frame command would look like the following:
  7002.  
  7003. "save.rexx" RX
  7004.  
  7005. Whenever the REAL 3D gets a new image ready, the frame command is executed
  7006. causing ARexx to run the "save.rexx" program saving the rendered image to
  7007. the video tape.
  7008.  
  7009. 6.8 Return Values From Other Applications
  7010.  
  7011. Just as REAL 3D can pass a return value to an ARexx program, other
  7012. applications can return result values to REAL 3D. Because some
  7013. applications use return values for indicating something else than just
  7014. error situations, return values are not automatically interpreted as
  7015. errors by RPL. The word RX_Rc word can be used for fetching the return
  7016. value from an executed ARexx command.
  7017.  
  7018. For example:
  7019.  
  7020. ( Simple RPL program sending an ARexx )
  7021. ( command to another application )
  7022. : RC_TEST
  7023.      ( send ARexx command :
  7024.      "ADDRESS ABCD Hi There" RX
  7025.      RX_RC @ ( fetch return value
  7026.      IF ( if return value is not zero
  7027.        "ARexx command failed" PUTS
  7028.      ELSE
  7029.        "Arexx command succeeded" PUTS
  7030.      ENDIF
  7031. ;
  7032.  
  7033.                              - REFERENCE 6.6 -
  7034.  
  7035. In this example, the execution of the RPL program is not terminated if the
  7036. ARexx command failed. However , if the error situation is fatal and the
  7037. RPL program should not continue at all, the ERROR word can be used for
  7038. terminating the RPL program.
  7039.  
  7040. ( Terminate the program if )
  7041. ( ARexx command fails )
  7042. : RC_TEST
  7043.      ( send ARexx command:
  7044.      "ADDRESS ABCD Hi There" RX
  7045.      RX_RC @ IF
  7046.        "Cannot execute ARexx command"
  7047.        ERROR
  7048.      ENDIF
  7049. ;
  7050.  
  7051. Note that you can use RX RC only for checking what kind of return values
  7052. the called external application returned. You cannot use it for affecting
  7053. the return value REAL 3D passes to the caller application which has sent
  7054. an ARexx message to REAL 3D's port. REAL 3D always returns 0 if the
  7055. executed command succeeded and a positive value if it failed. In order to
  7056. return more information to the caller application, use result strings or
  7057. the Clip List.
  7058.  
  7059. 6.9 Result Strings from Other Applications
  7060.  
  7061. ARexx commands sent by REAL 3D can return information from eternal
  7062. applications through "result string" much the same way as REAL 3D can
  7063. return result strings to eternal applications. The result string can be
  7064. accessed using the RPL word RX_RESULT.
  7065.  
  7066. For example, lets imagine that the user starts an external application
  7067. whose ARexx port name is EXTAPP and which supports the ARexx command
  7068. called WEEK_DAY. This command returns the result string containing the
  7069. current day of week. The RPL program could look like this:
  7070.  
  7071. ( RPL program which asks the current day )
  7072. : DAY
  7073.      ( send ARexx command )
  7074.      "ADDRESS EXTAPP WEEK_DAY" RX
  7075.  
  7076.      ( check the return value )
  7077.      RX_RC @ IF
  7078.        "Cannot get day" ERROR
  7079.      ENDIF
  7080.  
  7081. ( print out the result string )
  7082. RX_RESULT PUTS
  7083. ;
  7084.  
  7085. For more information about all ARexx oriented RPL words, see the RPL
  7086. reference chapter 4.10 AREXX WORDS.
  7087.  
  7088.                              - REFERENCE 6.7 -
  7089.  
  7090. Appendix A PREDEFINED ICONS.
  7091. ----------------------------
  7092.  
  7093. Figure: AA-1  (PICTURE: AA-1)
  7094. Figure: AA-2  (PICTURE: AA-2)
  7095.  
  7096. Appendix B HOT KEYS AND MENUS
  7097. -----------------------------
  7098.  
  7099. SYMBOLS USED FOR HOT-KEY DESCRIPTIONS
  7100.  
  7101.  
  7102. <CTRL>  - control key
  7103. <ALT >  - either alt key
  7104. <SHIFT> - either shift key
  7105. <LAM>   - left Amiga key
  7106. <RAM>   - right Amiga key
  7107.  
  7108. <ENTER> - enter or return key
  7109. <SPACE> - space bar
  7110. <TAB>   - tab key
  7111. <BSP>   - backspace key
  7112. <DEL>   - delete key
  7113. <ESC>   - escape key
  7114.  
  7115. <LMB>   - left mouse button
  7116. < RMB>  - right mouse button
  7117. <DRAG>  - use OS 2.0 drag box
  7118.  
  7119. <CLK>   - cursor left key
  7120. <CRK>   - cursor right key
  7121. <CUK>   - cursor up key
  7122. <CDK>   - cursor down key
  7123. ,       - keys must be pressed in sequence
  7124.  
  7125. There are three levels of keyboard support:
  7126.  
  7127.      Immediate
  7128.      Menu Function
  7129.      RPL Key Binding
  7130.  
  7131. IMMEDIATE HOT-KEY ACTIONS
  7132.  
  7133. Certain actions are invoked only by hot-keys, there are no menu
  7134. equivalents. The following are the immediate hot-key actions:
  7135.  
  7136. VIEW COORDINATE CONTROL
  7137.  
  7138. ViewPoint Rotation - rotation of viewpoint around aimpoint:
  7139.  
  7140. <CUK> & <CDK>           - Tilt
  7141. <CLK> & <CRK>           - Pan
  7142. <SHIFT><CLK> &
  7143. <SHIFT><CRK>            - Roll
  7144.  
  7145. ViewPoint Movement:
  7146.  
  7147. <ALT><CLK> & <ALT><CRK> - X axis
  7148. <ALT><CUK> & <ALT><CDK> - Y axis
  7149. <SHIFT><ALT><CLK> &
  7150. <SHIFT><ALT><CRK>       - Z axis
  7151.  
  7152. SPECIALS
  7153.  
  7154. <ESC>                   - Cancel all
  7155. <SPACE>                 - Cancel refresh
  7156. <ENTER>                 - Refresh
  7157.  
  7158. MOUSE ACTION MODIFIERS
  7159.  
  7160. <LMB><CTRL>             - Defines a new coordinate but leaves System Hot-
  7161.                           Point unaltered.
  7162.  
  7163. <LMB><ALT>              - Push coordinates onto Vector Stack
  7164.  
  7165. <DRAG>                  - Performs an Average All action on all points
  7166.                           contained within the drag box
  7167.  
  7168. <DRAG> <SHIFT>          - Push points onto Vector Stack
  7169.  
  7170. <DRAG><ALT>             - Average All with points from selected objects
  7171.  
  7172.                              - APPENDIX B.1 -
  7173.  
  7174. <DRAG><SHIFT><ALT>      - Push points from selected objects
  7175.  
  7176. <DRAG><CTRL><SHIFT>     - Automatic group creation
  7177.  
  7178. <DRAG><CTRL><SHIFT><ALT>- Automatic group creation with selected objects
  7179.  
  7180. CREATION HOT-KEYS
  7181.  
  7182. <BSP>                   - Close curve
  7183.  
  7184. <TAB>                   - Average coordinates in object creation
  7185.                           (find centre)
  7186.  
  7187. MACRO ARD SUPPORT
  7188.  
  7189. SINGLE-KEY MACROS: Configurable. See the file "RPL-startup"
  7190.  
  7191. MENU HOT-KEYS
  7192.  
  7193. The following list shows the current Menu functions and corresponding
  7194. hot-keys. Also the menu numbers are listed here; use these numbers when
  7195. using MENU word of RPL to define custom key bindings.
  7196.  
  7197. MAINMENU
  7198.  
  7199. Function        Hot-key         RPL MENU Code
  7200.  
  7201. PROJECT/
  7202. Objects/
  7203. Insert                          0 0 0
  7204. Save                            0 0 1
  7205. Replace                         0 0 2
  7206. Project/
  7207. New                             0 1 0
  7208.  
  7209. Insert                          0 1 2
  7210. Save                            0 1 3
  7211. Replace                         0 1 4
  7212.  
  7213. Insert Sections                 0 1 6
  7214. Save Sections                   0 1 7
  7215. Replace Sections                0 1 8
  7216. Materials/
  7217. Window          <RAM>m          0 2 0
  7218.  
  7219. Delete                          0 2 2
  7220. Delete_All                      0 2 3
  7221.  
  7222. Insert                          0 2 5
  7223. Save                            0 2 6
  7224. Replace                         0 2 7
  7225. Macros/
  7226. * Record_Macro                  0 3 0
  7227.  
  7228. Execute_Current                 0 3 2
  7229. Execute_Named                   0 3 3
  7230. Repeat_Current                  0 3 4
  7231. Spread_Current                  0 3 5
  7232.  
  7233. Current_to_Named                0 3 7
  7234. Named_to_Current                0 3 8
  7235. Named Colors/
  7236. Select                          0 4 0
  7237. Create                          0 4 1
  7238. Modify                          0 4 2
  7239. Delete                          0 4 3
  7240.  
  7241. Insert                          0 4 5
  7242. Save                            0 4 6
  7243. Replace                         0 4 7
  7244.  
  7245.                              - APPENDIX B.2 -
  7246.  
  7247. Function        Hot-key         RPL MENU Code
  7248.  
  7249. Windows/
  7250. Select                          0 5 0
  7251. View                            0 5 1
  7252. View_Superbitmap                0 5 2
  7253. View_Borderless                 0 5 3
  7254. View_DBuffered                  0 5 4
  7255. RPL                             0 5 5
  7256. Tools                           0 5 6
  7257. Animation       <RAM>a          0 5 7
  7258. Palette         <RAM>p          0 5 8
  7259. Measuring                       0 5 9
  7260. Screen                          0 5 10
  7261.  
  7262. Close                           0 5 12
  7263. * No Gadgets                    0 5 13
  7264. Environment/
  7265. Open_Screen                     0 6 0
  7266. Make_Def. Pub                   0 6 1
  7267. Close_Screen                    0 6 2
  7268. Close_Current                   0 6 3
  7269.  
  7270. Insert                          0 6 5
  7271. Save                            0 6 6
  7272. Replace                         0 6 7
  7273.  
  7274. Save_Screen                     0 6 9
  7275. Screen_Palette                  0 6 10
  7276. External Screen/
  7277. Open                            0 7 0
  7278. Close                           0 7 1
  7279. Set_Modes                       0 7 2
  7280. Settings                        0 7 3
  7281. Save                            0 7 4
  7282. Exit_Real                       0 8 0
  7283.  
  7284. CREATE/
  7285. Visibles
  7286. Polygon                         1 0 0
  7287. Polyhedron                      1 0 1
  7288. Polymid                         1 0 2
  7289. Cut_polymid                     1 0 3
  7290.  
  7291. Rectangle                       1 0 5
  7292. Cube                            1 0 6
  7293. pyramid                         1 0 7
  7294. Cut_pyramid                     1 0 8
  7295.  
  7296. Reg.polygon                     1 0 10
  7297. Reg.polyhedr.                   1 0 11
  7298. Reg.polymid                     1 0 12
  7299. Reg.cut.plmd                    1 0 13
  7300.  
  7301. Circle                          1 0 15
  7302. 3P_Circle                       1 0 16
  7303. Cylinder                        1 0 17
  7304. Cone                            1 0 18
  7305. Cutcone                         1 0 19
  7306.  
  7307. Sphere                          1 0 21
  7308. Ellipsoid                       1 0 22
  7309. Ellipsegment                    1 0 23
  7310. Cut_ellipseg                    1 0 24
  7311.  
  7312. Hyperbol                        1 0 26
  7313. Cut_hyperb.                     1 0 27
  7314. Sectors/
  7315. Circle                          1 1 0
  7316. Cylinder                        1 1 1
  7317. Cone                            1 1 2
  7318. Cut_cone                        1 1 3
  7319.  
  7320. Ellipsegment                    1 1 5
  7321. Cut_ellipseg.                   1 1 6
  7322.  
  7323. Hyperbol                        1 1 8
  7324. Cut_hyperbol                    1 1 9
  7325. Structure/
  7326. Level                           1 2 0
  7327. Link                            1 2 1
  7328. Group                           1 2 2
  7329. Method                          1 2 3
  7330. Light-sources/
  7331. Point                           1 3 0
  7332. Line                            1 3 1
  7333. Wall                            1 3 2
  7334. Controls/
  7335. Attribute                       1 4 0
  7336. Offset                          1 4 1
  7337. Axis                            1 4 2
  7338. Coordsys                        1 4 3
  7339.  
  7340. Open_Line                       1 4 5
  7341. Closed_Line                     1 4 6
  7342. Circular_Line                   1 4 7
  7343.  
  7344.                              - APPENDIX B.3 -
  7345.  
  7346. Function        Hot-key         RPL MENU Code
  7347.  
  7348. B-Spline_Ctrlp                  1 4 9
  7349. B-Spline_Knot                   1 4 10
  7350. B-Spline_Curve                  1 4 11
  7351. B-Spline_Closed                 1 4 12
  7352. B-Spline_Cir.                   1 4 13
  7353. B-Spline_Helix                  1 4 14
  7354.  
  7355. Mapping/
  7356. Default                         1 5 0
  7357. Parallel                        1 5 1
  7358. Cylinder                        1 5 2
  7359. Sphere                          1 5 3
  7360. Disk                            1 5 4
  7361. Observers/
  7362. Viewpoint                       1 6 0
  7363. Aimpoint                        1 6 1
  7364. Compound_Tools/
  7365. Lathe                           1 7 0
  7366.  
  7367. Circular_Subdivided             1 7 2
  7368. Rounded_Circ._Subd.             1 7 3
  7369. Sharp_Circular                  1 7 4
  7370. Rounded_Circular                1 7 5
  7371.  
  7372. Conical                         1 7 7
  7373. Conical_Subdivided              1 7 8
  7374.  
  7375. Rectangular                     1 7 10
  7376. Rectangular_Subdiv.             1 7 11
  7377. Rectangular_Conical             1 7 12
  7378. Rect.Conical_Subd.              1 7 13
  7379.  
  7380. Rounded_Polygon                 1 7 15
  7381. Rounded_Polyhedron              1 7 16
  7382. Ellipsed_Polygon                1 7 17
  7383. Ellipsed_Polyhedron             1 7 18
  7384.  
  7385. Join_Primitives                 1 7 20
  7386. ObJect-Pixel_Tool               1 7 21
  7387.  
  7388. Freeform/
  7389. Mesh                            1 8 0
  7390.  
  7391. Coplanar                        1 8 2
  7392. Orthogonal                      1 8 3
  7393. Rotate                          1 8 4
  7394. Swing/Move                      1 8 5
  7395. Swing/Size                      1 8 6
  7396. Build from Curves               1 8 7
  7397. MeshPixel_ Tool                 1 8 8
  7398.  
  7399. Fractals/
  7400. Landscape                       1 9 0
  7401. Tree                            1 9 1
  7402.  
  7403. Boolean/
  7404. OR                              1 10 0
  7405. AND                             1 10 1
  7406. AND_NOT                         1 10 2
  7407. AND_with_Paint                  1 10 3
  7408. AND_NOT_with_Paint              1 10 4
  7409.  
  7410. Rethink                         1 10 6
  7411. Rethink_All                     1 10 7
  7412. Unthink                         1 10 8
  7413. Unthink_All                     1 10 9
  7414.  
  7415. MODIFY/
  7416. Linear/
  7417. Move                            2 0 0
  7418. Move_COG                        2 0 1
  7419. Size_2D                         2 0 2
  7420. Size_3D                         2 0 3
  7421. Stretch                         2 0 4
  7422. Extend                          2 0 5
  7423. Rotate                          2 0 6
  7424. Mirror                          2 0 7
  7425. Shear                           2 0 8
  7426. Rot&Ext                         2 0 9
  7427. Deform                          2 0 10
  7428. Structure/
  7429. Cut                             2 1 0
  7430. Copy                            2 1 1
  7431. Paste                           2 1 2
  7432. Delete                          2 1 3
  7433. Duplicate                       2 1 4
  7434. Swap                            2 1 5
  7435. Properties/
  7436. Color                           2 2 0
  7437. Name                            2 2 1
  7438. Attributes                      2 2 2
  7439. Alpha Channel                   2 2 3
  7440. Tags                            2 2 4
  7441. Animation                       2 2 5
  7442. Replace_Tags                    2 2 6
  7443. COG                             2 2 7
  7444. Direction                       2 2 8
  7445. Velocity                        2 2 9
  7446. Spin                            2 2 10
  7447. Size                            2 2 11
  7448.  
  7449.                              - APPENDIX B.4 -
  7450.  
  7451. Function        Hot-key         RPL MENU Code
  7452.  
  7453. Bend_Local/
  7454. Move_2D                         2 3 0
  7455. Move_3D                         2 3 1
  7456. Move_Radial                     2 3 2
  7457.  
  7458. Size_2D                         2 3 4
  7459. Size_3D                         2 3 5
  7460. Size_Radial                     2 3 6
  7461. Bend Global/
  7462. Move_2D                         2 4 0
  7463. Move_3D                         2 4 1
  7464. Move_Radial                     2 4 2
  7465.  
  7466. Size_2D                         2 4 4
  7467. Size_3D                         2 4 5
  7468. Size_Radial                     2 4 6
  7469. Bend_Endp./
  7470. Move_2D                         2 5 0
  7471. Move_3D                         2 5 1
  7472. Move_Radial                     2 5 2
  7473.  
  7474. Size_2D                         2 5 4
  7475. Size_3D                         2 5 5
  7476. Size_Radial                     2 5 6
  7477. Bend Linear
  7478. Move_2D                         2 6 0
  7479. Move_3D                         2 6 1
  7480. Move_Radial                     2 6 2
  7481.  
  7482. Size_2D                         2 6 4
  7483. Size_3D                         2 6 5
  7484. Size_Radial                     2 6 6
  7485. Non-linear/
  7486. Move                            2 7 0
  7487. Size                            2 7 1
  7488. Stretch                         2 7 2
  7489. Rotate                          2 7 3
  7490.  
  7491. * Parabola                      2 7 5
  7492. * Linear                        2 7 6
  7493. * Circle                        2 7 7
  7494. * Sine                          2 7 8
  7495. * Curve                         2 7 9
  7496.  
  7497. Set_Tool                        2 7 11
  7498.  
  7499. Special/
  7500. Project_to_Object               2 8 0
  7501. Inverse_Kinematic               2 8 1
  7502. COGs/
  7503. Size_2D                         2 9 0
  7504. Size_3D                         2 9 1
  7505. Stretch                         2 9 2
  7506. Extend                          2 9 3
  7507. Rotate                          2 9 4
  7508. Mirror                          2 9 5
  7509. Shear                           2 9 6
  7510. Rot&Ext                         2 9 7
  7511. About COGs/
  7512. Size_2D                         2 10 0
  7513. Size_3D                         2 10 1
  7514. Stretch                         2 10 2
  7515. Extend                          2 10 3
  7516. Rotate                          2 10 4
  7517. Mirror                          2 10 5
  7518. Shear                           2 10 6
  7519. Rot&Ext                         2 10 7
  7520. Freeform/
  7521. Reparametrize                   2 11 0
  7522. Move_Knotpoint  <RAM>k          1 11 1
  7523. Concatenate                     2 11 2
  7524. Swap_Direction                  2 11 3
  7525. Open/Close                      2 11 4
  7526. Type                            2 11 5
  7527. Invert                          2 11 6
  7528. Remap                           2 11 7
  7529. Surf.to_curves                  2 11 8
  7530. Distribute                      2 11 9
  7531. Assign                          2 11 10
  7532. xchange_u_&_v                   2 11 11
  7533. Snap to                         2 11 12
  7534. Delete                          2 11 13
  7535. Insert                          2 11 14
  7536. Break                           2 11 15
  7537.  
  7538. Draw Mode/
  7539. * Accurate                      2 12 0
  7540. * Bounding_box                  2 12 1
  7541.  
  7542.                              - APPENDIX B.5 -
  7543.  
  7544. Function        Hot-key         RPL MENU Code
  7545.  
  7546. VIEW/
  7547. Type/
  7548. * Parallel                      3 0 0
  7549. * Perspective                   3 0 1
  7550.  
  7551. * Separate IO                   3 0 3
  7552. Input Crd/
  7553. Set_XY          <RAM>x          3 1 0
  7554. Set_YZ          <RAM>y          3 1 1
  7555. Set_ZX          <RAM>z          3 1 2
  7556. Set_Custom      <RAM>c          3 1 3
  7557. Set_Origin                      3 1 4
  7558. Define_X                        3 1 5
  7559. Define_Y                        3 1 6
  7560. ObJect_Space->View              3 1 7
  7561.  
  7562. Camera/
  7563. Forwards        <RAM>f          3 2 0
  7564. Backwards       <RAM>b          3 2 1
  7565. Orientation                     3 2 2
  7566. View->Camera    <RAM>v          3 2 3
  7567. Camera->View    <RAM>w          3 2 4
  7568. Create_Camera                   3 2 5
  7569.  
  7570. * Camera_View                   3 2 7
  7571. Display/
  7572. Zoom_In         <RAM>+          3 3 0
  7573. Zoom_Out        <RAM>-          3 3 1
  7574. Custom_Scale                    3 3 2
  7575. Position                        3 3 3
  7576. Pos&Zoom_In     <RAM>i          3 3 4
  7577. Pos&Zoom_Out    <RAM>o          3 3 5
  7578. Reset           <RAM>e          3 3 6
  7579. Auto focus                      3 3 7
  7580. Grid/
  7581. Select                          3 4 0
  7582. Create                          3 4 1
  7583. Modify                          3 4 2
  7584. Reposition                      3 4 3
  7585. Delete                          3 4 4
  7586.  
  7587. * Visible                       3 4 6
  7588. * Snap_to_Grid                  3 4 7
  7589.  
  7590. Render/
  7591. Window          <RAM>r          3 5 0
  7592. Boxes           <RAM>t          3 5 1
  7593.  
  7594. Greyscale       <RAM>g          3 5 3
  7595. HAM             <RAM>h          3 5 4
  7596.  
  7597. * Selected                      3 5 6
  7598. Settings        <RAM>s          3 5 7
  7599.  
  7600. Export_RPL                      3 5 9
  7601. Render_Hierarchy                3 5 10
  7602. Drawing_Set     <RAM>d          3 6 0
  7603. Boxes/
  7604. Define                          3 7 0
  7605. Modify                          3 7 1
  7606. Delete                          3 7 2
  7607. Delete_All                      3 7 3
  7608. Show_All                        3 7 4
  7609.  
  7610. ANIMATE/
  7611. Create/
  7612. Path                            4 0 0
  7613. Direction                       4 0 1
  7614. Rotation                        4 0 2
  7615. Sweep                           4 0 3
  7616. Stretch                         4 0 4
  7617. Size                            4 0 5
  7618. RPL                             4 0 6
  7619. Control/
  7620. Play_Forwards                   4 1 0
  7621. Play_Backwards                  4 1 1
  7622. Go_to_Beginning                 4 1 2
  7623. Go_to_End                       4 1 3
  7624. Go_to_?                         4 1 4
  7625. Step_Forwards                   4 1 5
  7626. Step_Backwards                  4 1 6
  7627.  
  7628. Refresh                         4 1 8
  7629.  
  7630.                              - APPENDIX B.6 -
  7631.  
  7632. Function        Hot-key         RPL MENU Code
  7633.  
  7634. EXTRAS/
  7635. Vectors/
  7636. Push                            5 0 0
  7637. Pull            <RAM>.          5 0 1
  7638. Enter                           5 0 2
  7639. Clear                           5 0 3
  7640.  
  7641. Add                             5 0 5
  7642. Subtract                        5 0 6
  7643. Average                         5 0 7
  7644. Average_All                     5 0 8
  7645. Cross_Product                   5 0 9
  7646.  
  7647. Eval._Current                   5 0 11
  7648. Define_&_Eval.                  5 0 12
  7649. Length_evaluate                 5 0 13
  7650.  
  7651. Lasso                           5 0 15
  7652. Undo            <RAM>u          5 1 0
  7653. Statistics                      5 2 0
  7654. Refresh_All/
  7655. Wire-frame                      5 3 0
  7656. Ray_Trace                       5 3 1
  7657. Cancel_All      <ESC>           5 4 0
  7658. Evaluate/
  7659. Curve_Length                    5 5 0
  7660. Parameter                       5 5 1
  7661. Select_Objects  <RAM><SPACE>    5 6 0
  7662. Free_Images                     5 7 0
  7663.  
  7664. SETTINGS/
  7665. Clip Boxes/
  7666. * Active                        5 0 0
  7667.  
  7668. Select                          5 0 2
  7669. Deselect                        5 0 3
  7670. General                         5 1 0
  7671. Refresh/
  7672. * None                          5 2 0
  7673. * Current                       5 2 1
  7674. * All                           5 2 2
  7675. Oper.Level/
  7676. * Active                        5 3 0
  7677.  
  7678. Depth                           5 3 2
  7679.  
  7680. Creation/
  7681. * Qry._Level_Name               5 4 0
  7682. * Qry._Prim._Name               5 4 1
  7683. * Auto_current                  5 4 2
  7684. * Auto_selected                 5 4 3
  7685. * Auto_index                    5 4 4
  7686. Paths                           5 5 0
  7687. Alpha_Channel                   5 6 0
  7688. Attributes                      5 7 0
  7689. RPL                             5 8 0
  7690. View Resolutions/
  7691. Rotation                        5 9 0
  7692. Position                        5 9 1
  7693. Zoom                            5 9 2
  7694. Undo/
  7695. * Active                        5 10 0
  7696.  
  7697. Set_Depth                       5 10 1
  7698. Clear                           5 10 2
  7699. File Icons                      5 10 3
  7700.  
  7701. TOOLS/
  7702. Icons/
  7703. * Visibles                      6 0 0
  7704. * Sectors                       6 0 1
  7705. * Structures                    6 0 2
  7706. * Lights                        6 0 3
  7707. * Controls                      6 0 4
  7708. * Compounds                     6 0 5
  7709. * Freef.Tools                   6 0 6
  7710. * Booleans                      6 0 7
  7711. * Mod/Linear                    6 0 8
  7712. * Mod/Structure                 6 0 9
  7713. Create_Icon                     6 1 0
  7714. Delete_Icon                     6 2 0
  7715.  
  7716. MATERIAL WINDOW MENU
  7717.  
  7718. DEFINE/
  7719. Texture         <RAM>d
  7720. Show_Image      <RAM>s
  7721. Transp._Color   <RAM>c
  7722. Tags            <RAM>t
  7723.  
  7724.  
  7725.  
  7726.                               END OF PART 6
  7727.  
  7728.  
  7729.  
  7730.  
  7731.  
  7732.